Android emulator uses wrong layout resources? - android

Android emulator uses wrong layout resources ,i'm having a two layout hdpi, mdpi but in emulator get a wrong one why ....
I added in my manifest file ,
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:largeScreens="true"
android:normalScreens="true"
/>

In andorid drawable resources usage is depends on ppi.
Please refer the link http://developer.vodafone.com/image-and-graphics-tips-android/
You have to change the emulator ppi values and try your's. Thanks...

Related

Android how to choose different dimension problems

I am new android and i have a question. I am developing a app, and i see this problem. I create layout for Pixel 2 and other devices cant show as Pixel 2. When i research, i learning create layout every dimension.
I added this on AndroidManifest.xml
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:normalScreens="true"
android:anyDensity="true"/>
And created different layout; example login_activity.xml (normal) and login_activity.xml (large). But how choose device this screen, is it automatic or other way?
https://github.com/intuit/sdp use this for support layout in multiple screen size.

My Android Studio keeps ignoring Large Layout and picks Normal for ALL screens

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?

Android layout qualifier does't work

Problem:When I tested my program on different size Android phones, the layout were not selected correctly.
I used setContentView(R.layout.activity_home) to set the layout.
In the res/ directory, I created
res/layout/activity_home.xml
res/layout-sw320dp/activity_home.xml
res/layout-sw480dp/activity_home.xml
res/layout-sw720dp/activity_home.xml
In the AndroidManifest.xml
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:anyDensity="true"
/>
Then I tested it seperately on 320x480,480x800,720x1280 emulators. All these devices selected the layout /res/layout-sw320dp/activity_home.xml.
The target platform I set is 4.4.2 and the emulator's version is 4.3.3.
I have no idea why this happened..
http://developer.android.com/guide/practices/screens_support.html
and
/ here
here
use this link and use the directory structure to support multiple screens
Hope it may help u

android image size with mdpi ldip hdpi xdpi

I have put 4 image for each folder mdpi,ldpi,hdpi,xdpi in the ratio of 3:4:6:8.
Now I need to make any changes in androidmanifieast.xml file or application automatic select from which folder he need to pick up proper image according to screen resolution of device?
Thank You.
Now I need to make any changes in androidmanifieast.xml
you have to add this code in manifest.xml file
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"/>
application automatically pick up proper image according to screen resolution..

how to work with different resolution in android?

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"
/>

Categories

Resources