S Simonxman Member Nov 27, 2012 #1 Hi guys i dont wanna my app to have landscape mode, if the phone rotate the app is still the same without any changes, is this possible if yes,how? Thanks !!
Hi guys i dont wanna my app to have landscape mode, if the phone rotate the app is still the same without any changes, is this possible if yes,how? Thanks !!
T Tom Law Active Member Licensed User Longtime User Nov 27, 2012 #2 From within Baic4Android Select Project, Orientations supported - set the required option. Upvote 0
S Simonxman Member Nov 27, 2012 #3 thanks man, is threre any other way to disable it, with some code maybe? Upvote 0
klaus Expert Licensed User Longtime User Nov 27, 2012 #4 Phone library: From the help: SetScreenOrientation Method Changes the current activity orientation. This method cannot be called from a service module. Orientation: -1 for unspecified, 0 for landscape and 1 for portrait. Returns : Void SetScreenOrientation(Orientation As Int) Best regards. Upvote 0
Phone library: From the help: SetScreenOrientation Method Changes the current activity orientation. This method cannot be called from a service module. Orientation: -1 for unspecified, 0 for landscape and 1 for portrait. Returns : Void SetScreenOrientation(Orientation As Int) Best regards.
T Tom Law Active Member Licensed User Longtime User Nov 27, 2012 #5 Klaus's method is the way to go: Load the phone library Dim Phone as Phone Phone.SetScreenOrientation(1) Upvote 0
Klaus's method is the way to go: Load the phone library Dim Phone as Phone Phone.SetScreenOrientation(1)
Prosg Active Member Licensed User Longtime User Jan 11, 2013 #6 i saw a lot of exemple to set orientation with the phone librarie... but i need to know the what is current orientation ? (if it's landscape or portrait) Upvote 0
i saw a lot of exemple to set orientation with the phone librarie... but i need to know the what is current orientation ? (if it's landscape or portrait)
T trebun Member Licensed User Longtime User Jan 11, 2013 #7 It's important to say, that you need this in a service ("Live Wallpaper" is a service). But, it's not possible to set the orientation on a service with a switch or the manifest. You must draw your picture/background corresponding to portrait when landscape is detected... Sorry, it's not a simple thing to do this on a service... ;-) Regards, trebun Upvote 0
It's important to say, that you need this in a service ("Live Wallpaper" is a service). But, it's not possible to set the orientation on a service with a switch or the manifest. You must draw your picture/background corresponding to portrait when landscape is detected... Sorry, it's not a simple thing to do this on a service... ;-) Regards, trebun
lagore Active Member Licensed User Longtime User Jan 11, 2013 #8 Code: Copy If 100%x < 100%y Then 'portrait Else 'landscape End If Upvote 0
klaus Expert Licensed User Longtime User Jan 11, 2013 #9 Beginner's Guide chapter 17.25 Detect screen orientation. Or in the search field 'detect screen orientation' the first result gives you the solution ! Code: Copy If Activity.Width > Activity.Height Then Orientation = "Landscape" Else Orientation = "Portait" End If Best regards. Upvote 0
Beginner's Guide chapter 17.25 Detect screen orientation. Or in the search field 'detect screen orientation' the first result gives you the solution ! Code: Copy If Activity.Width > Activity.Height Then Orientation = "Landscape" Else Orientation = "Portait" End If Best regards.
Prosg Active Member Licensed User Longtime User Jan 11, 2013 #10 thx a lot Klaus you look good can u try to resolve our problem in this post... i see you resolve a lot of problem in this forum ^^ http://www.b4x.com/forum/basic4andr...7-live-wallpaper-background-4.html#post145477 Problem 1 : A black side on a picture Problem 2 : Landscape and portrait U could be our hero Upvote 0
thx a lot Klaus you look good can u try to resolve our problem in this post... i see you resolve a lot of problem in this forum ^^ http://www.b4x.com/forum/basic4andr...7-live-wallpaper-background-4.html#post145477 Problem 1 : A black side on a picture Problem 2 : Landscape and portrait U could be our hero