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

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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…