Android: Changing layout based on phone specs - android

My app looks great on my phone, and on my AVD. On my co-dev's phone though, his screen is smaller and all the content isn't shown. Is there a way to detect how big the users screen is and adjust the layout from there? If so can someone link me a tutorial? Thank you guys!

Android has two excellent articles on this subject:
Supporting Different Screen Sizes
Supporting Multiple Screens

Related

Universal Android application for tablet and mobile

I want to develop an application which is universal for tablet as well as for mobile. By creating xmls of different screen sizes i.e. small, normal, large, and extra large, does my purpose will be solved?
I am not sure about this, please guide me to develop that application in every aspect.
Thanks in Advance.
You should take a look at the designing for multiple screen sizes documentation.
Beyond that, you may not need layouts for each and every size. Sometimes, scaling a smaller/bigger layout up or down will suffice.
You will also be need to make sure you don't end up using features like cell phone calling, as most tablets don't support that.

Porting android apps for Samsung Tablet

I want to port my application for samsung tab and i want to know what layout and resource should be keep in my resource file.what will be image size for samsung tab 10",7.1".
Thanks
The best way to do that is to read this article Supporting multiple screen sizes
There you can find the screen sizes and densities for what you are looking for.
Good luck!
i just want to add, never develop an app for a specific brand / screen size / hardware configuration when possible. In the case mentioned it would be simple to define different res/layout-xxx files to offer compatibility with a wide range of devices while mantaining simplicity

screen resoultion when moving up to tablets

I have developed a business app that runs fine on android phone. What do i need to do the screen designs (xml files) so it will scale up for example 10" tablets? but still be okay on the phone?
thanks
You've asked a general questions so the best I can do is give you a general answer. You should read the android documentation on Supporting Multiple Screens.

android app for tablet of multiple resolutions

How to make an android applications for tablet of multiple resolutions like 1024x600pixels or 1280x800 pixels. I had made an app for the resolution 1024x600 but it completely get distorted on the the tablet of resolution 1280x800...
Any Help....
Thanks in advance....
Step #1: Replace your "handling the whole layout programmatically for all the activities" with XML layout resources. IMHO, while it is possible to define your UIs totally in Java and handle multiple screen sizes, that is a technique reserved for expert Android developers. In other words, if you have to ask "how to make an android applications for tablet of multiple resolutions", then you lack the experience necessary to be "handling the whole layout programmatically for all the activities".
Step #2: Follow the guidance of the Android developer documentation for supporting multiple screen sizes.
Step #3: If you still have problems, ask more specific, focused, and longer questions. In other words, explain specifically what your problem is, supply the code/layout XML that is giving you problems, and supply screenshots to illustrate the output you are getting.

layout elements position problem

i've created an application for galaxy S..so i'm using 3.7 inch(resolution 320x480) layout for my xml files. The app is working perfectly on the phone. When using the same app in HTC wildfire whose resolution is 240x320 the graphics are out of position. I know the reason is obvious that I'm developing app in 3.7WVGA so graphics will not be compatible for QVGA.
Is the only solution is to create different versions of app on the basis of devices?? or is there a universal solution which i can implement so that the app will run without graphical repositioning on all the devices having different screen sizes and different resolution support??
please help me...coz i dnt really know the answer....and thank you in advance
If you can get away with it, use linear layouts and position things by weight. That way the ratios will stay the same and the same general appearance will hold.

Categories

Resources