This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to support different screen size in android
So im making an android app that i want to support both tablet and mobile phone screen sizes i tried using the supports-Screen method but when i type in support xlarge screens gives me an error.
Does anyone know how i could do this?
Thanks
You can check the src code for the last Google IO application, it support tablets and phone. And has several useful code snippets and design patterns.
IOsched
Hope this helps you :)
Supporting multiple screen sizes in Android can be tricky at first, but http://developer.android.com/guide/practices/screens_support.html will be your best friend.
As a beginner (I'm assuming you are a beginner) you must first create a default layout, then in Android you can begin adjusting your layout for tablets and such. A video that helped me immensely was this video from Google I/O last year. Deffinitely worth your time to watch the whole thing.
http://www.youtube.com/watch?v=Oq05KqjXTvs&feature=player_embedded
Related
I am trying to develop an app, which support all mobile and tablet devices of every screen size and density, but every time i got some changes in UI for different screen sizes for example in image below i put three text on screen but it always change its location in different screen devices.
I tried smallest width screen(600,720,320,480) and screen size(S,N,L,X) but both are not working properly,
is there anyone who can help me with specific data. please dont refer developer android site because i looked so many website but they only describe android screen specification, they dont give any proper solution. please give me any proper solution or project sample will be better.
thanks in advance.
http://i.stack.imgur.com/R1uKU.png
The screens in my app needs to be displayed in the same way on both type of devices, phones and tablets. Currently my app works fine on phones, but they behave weird when run on tablets. The problem occurs with the positioning and size of components in the screen.I have 9 patch images generated for all the images being used but still for some components that I use absolute size/margin values such as 30dp,50dp etc do not seem to be good measures that work well on a tablet. Some of my thoughts/questions are:
PercentRelativeLayout - is it the best solution to overcome this
problem?
Is there a way that layouts can be defined so as to draw
differently on phones and tablets. Please note that that I do not
have any complex menus or behaviour that needs to work differently
on different devices, they are same.
Do I have to develop 2 different apps?
you have to make different layouts for both android phone and tablet.
Look at this link
Read more on the Android developer documentation after reading answers above. Found this resource to be more explicit for someone who is totally unaware of supporting multiple screens. http://www.survivingwithandroid.com/2012/07/how-to-support-multiple-screen-in.html
I am going to create an app for devices with Android OS 2.1 and higher. As many developer I met layout problems and after reading about that in the official android documentation I decided to follow a way; I created 6 directory one for every screen density (ldpi,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi). What I want to know is if I did it right, I know that layout could be not exact at 100% but could I'll meet serious problems doing that?What I should do?
The second problem is checking app in many devices in the same time, I use Android Studio and I am able to create devices and use emulators but there is a plugin or a website or something else I can use to test quickly the app in tens of Android devices without set all manually?
Thanks in advance!
I don't know the answer to the question posted at https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=155879.
How do i sort it out please as I was kindly asked to refer this and other questions here?
For one, your emulator is using a Nexus 5 layout, and your preview is using a nexus 4. This is causing the difference
For two, please don't link to external sites with your question, but posting it directly on SO it ensures that others who come in the future will be able to see the question (what happens if the external site goes down, or changes it's link structure)
For three, please make your layout flexible to different screen sizes as you will not be able to control what devices your users will be running your app on. (unless you are only using this app in a controlled environment, and not releasing it to the public)
This question already has answers here:
how to resize physical android screen from terminal/shell
(3 answers)
Closed 9 years ago.
I'm thinking of purchasing an Android tablet for development. But I plan on developing both phone and tablet apps. I know that they technically both run they might just look different because of resolution differences.
My question is can I change the screen dimensions of a tablet to have the same screen size as a phone? Not really so much changing the resolution (so it would still take the whole screen), but more cutting of the edges so that the actual screen dimensions are that of a typical phone.
If you do not want to purchase a tablet, you can still test your applications using AVDs.
I haven't, however, ever heard of a way to change the screen dimensions of the tablet without actually slicing it through with a chainsaw :) If there are any ways I would be really interested in knowing!
play.google Here is an app by which you can change the density and other root properties of your phone. All the build properties can be edit by this if you have root permission of the device.