And he created all that is in the heavens and all that is on earth. He is also the creator of good and evil. BUT He gave us the ability to chose. Death will surely come to us all hence it's only whilst we are alive, sane and well can we chose our path: good or evil, or something in between. God is by no means unjust. This is what I believe. And my knowledge is derived mostly of course via the Quran and Prophetic narrations.
Likewise in Islam we believe that whilst our life spans, livelihoods etc are decreed by God, certain good deeds like being kind to the poor, giving in charity,keeping good ties with our relatives, praying and supplicating to God, a parents prayer,etc can change our destiny and prolong our lives.