Android Question load img orientation

buras3

Active Member
Licensed User
Longtime User
Hi

how can i load to activity imgs by orientation?
one for landscape
and one for portrait

thank you
 

Star-Dust

Expert
Licensed User
Longtime User
B4X:
if 100%×>100%y then
   ' landscape
   Activity.SetBackground(landscapeIMG)
Else
    'Portrait
    Activity.SetBackground(PortraitIMG)
End if
 
Last edited:
Upvote 0

buras3

Active Member
Licensed User
Longtime User
i get error
upload_2018-5-1_18-36-15.png
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
If you put the file name I must also use the loadbitmap command

B4X:
if 100%×>100%y then
   ' landscape
   Activity.SetBackground(loadbitmap(path,landscapeIMG))
Else
    'Portrait
    Activity.SetBackground(loadbitmap)path,PortraitIMG))
End if
 
Upvote 0
Top