when I run my android app on tablet in landscape mode the apps apears from right to left (as if it is portrait mode) not up to down, how to fix that?
you can find a snapshot here: http://i.stack.imgur.com/vpO9M.jpg
I am trying to make my app compatible with tablets I created the layout res for large screens and x large screens (layout-xlarge, layout-xlarge-land, layout-large and layout-large-land) and I added this to my androidManifest.xml file:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
Try adding this within your activity, in your manifest.xml file
android:configChanges="orientation|keyboardHidden|screenSize|layoutDirection"
Related
I'm using the Layout Variants tool to create differents sizes for my layout.
the problem is that when i pick any large Device to preview my layout..
it keeps using the normal size
how can i force it to pick the right layout for the screen ?
by the way i already did the AndroidManifest support screens
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
but still having problems!
also my app icon looks so small too in my phone!
any idea?
I know that i have to put this code in manifest
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
also i created different layout sizes and dimens:
layout-small
layout-normal
layout-large
layout-xlarge
Here is the confusion, the phone will pick automatically the screen size but there are different phone with screen sizes that pick same layout size. Let say layout-normal can take starting galaxy one and S up to galaxy 6 which have different screen size. In layout-normal is only one file but it will not fit all phones which takes layout-normal.
How to design and fix that layout that fixes every screen in layout-normal?
I have to prepare one application.I want give support to different resolution.i have to prepared different layouts.Frist time my layouts is,
res/layout/mylayout----7" normal screen
res/layout-large/mylayout----7" large screen
res/layout-xlarge/mylayout---10.1"
but it is taking 7" large screen.i found some solution in this site.Solution is ,create layout is,
res/layout/mylayout----7" normal screen
res/layout-sw600dp/mylayout----7" large screen
res/layout-sw720/mylayout---10.1"
After changed layout names it is taking 7" large screen only. please help me do.
Check your project Build Target To support xlarge screen your project build target should be atleast android 2.3.3 adk.
In Eclipse -?right click on project -> Properties -> Android -> Select Project Build Tagrget as 2.3.3 or onwards.
First of all set the multiple screen support in your Android Application manifest file
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
And also see this Link
For mulitple screen support Try by using this... in ur android manifest file
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
/>
I am using the same code for both tablets and mobile, and I want to write an app for Xlarge screens with landscape. I wrote one condition but when I am rotating into portrait it generates an exception.
I have declared the condition:
final boolean isPortrait = getResources().getConfiguration().orientation ==Configuration.ORIENTATION_PORTRAIT;
I want code with if else condition using xlarge and landscape orientations but it should work for only tablets but while coming to mobile it should not work.
There are two methods to make an application full screen. The first simply states the application supports a specific dpi. The following code in the Manifest supports all dpis.
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
I'm starting 3.1 AVD and wnen loading upplication to it the application shows fully but much smaller than actual screen like its dimentions were set statically to be smaller than the screen.
Add an appropriate <supports-screens> element to your manifest, and consider adding a <uses-sdk> element with android:targetSdkVersion="11".
If you are supporting tablet screen sizes, a likely element would be:
<supports-screens android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false" />
You could consider adding true for small screens as well, if you are supporting that size too.