Design of the home screen in android - android

I am new to android and having requirement to design my home screen for the app.which look like as shown below.
Home screen image.
as the picture shown above contain five button which having five different drawable image with different design and different size.the same layout while running in one device look different compare to the one running on other device.different device means here the different screen size and different resolution.so now the question is how to design that size and resolution of image and layout so its fit with any screen size and resolution on any device android device available in market and never expand or collapse with different screen size.i am testing the app in three different screen size device and resolution also and the look change for every device.Any kind of reply will be very helpful.

Use RelativeLayouts to separate the different boxes.
Apart from that, whatever you asked is broad.You should refer the Designing for Multiple Screens documentation available at android.

You should follow the advice that's detailed in the documentation on how to design for different screen sizes. You're going to have to have more than one image to handle all your scenarios obviously.
http://developer.android.com/guide/practices/screens_support.html

place Button background images in 4 resolutions in the res folder as ldpe mdpi hdpi and xhpdi .use Dip insted of dp.

Related

Is it necessary to create "small, normal, large and xlarge android xml layouts" folders if i want my application to run of all Android devices

I am developing an Android Application that supports all kind of Android devices like mobiles and tablets. But it's time consuming to create multiple folders (small, normal, large and xlarge android xml layouts) to support all the Android devices. Is there any way to build an android app that runs on all android devices without creating these folders:small, normal, large, xlarge etc?
You only need to create unique layouts (ie. *layout_mdpi* ) if you want something unique for that particular screen size.
If you want to use the same layout on all different screen sizes, you will only need to create a single layout (in the layout folder).
Only if you want to customize a particular layout would you need a new FOLDER in layouts (named: layout_mdpi) in that folder you would have multiple copies of customized layout with same name (ex. my_layout.xml)
To clearly answer your question - you will only need the layout folder and no other ones in your casel
Ex.
res\layout\my_layout.xml // this folder is all you need if this layout will work on all screen sizes
res\layout_mdpi\my_layout.xml // you ONLY need this if you are presenting something unique on this screen size.
In Android we need to maintain different folders for the layouts with different resolution reason behind it is the use or the resolution of the Android Device on which the application gonna execute.
small Resources for small size screens.
normal Resources for normal size screens. (This is the baseline size.)
large Resources for large size screens.
xlarge Resources for extra large size screens.
Android OS select the specific layout it self by checking the compatible device and its resolution.
So, better to create folders to support in multiple screens
For More Info refer this
Is there any way to build an android app that runs on all android devices without creating these folders:small, normal, large, xlarge etc
Consider this, you have a button (with match_parent) that stretches full width of a screen in portrait mode of a 4 inch phone, that's fine it looks alright, but then that same layout on a 10 inch tablet in portrait is now 3-4inch wide, that's not great looking.
"So what" you say, make it wrap content, okay then so the button now only fills up part of the width on phone, still looks okay but then on a tablet you have huge amount of space now either side of the button, maybe that's looks okay, maybe not.
Maybe same button on a smaller screen takes up too much space?
Now apply the above to every single layout element in your app.
Do you think it'll look good, using the same layout, do you think your users will be okay with an app that was so little care to its UI and UX?
SO, in conclusion, yeah it's possible to only use one eg normal, for all devices but it'll probably look terrible on most of them.

Android Screen Sizes for different devices

I am new to android development and now i have started developing wallpaper apps.I saw the android developer page which tells the ratio 3:4:6 or something which i don't understand. Everything is working but the image which i set go off the screen sometimes it gets cropped around the corners and image does not look good. i use the screen size 600*480 in hdpi. Any suggestion about the different size images i should use may be for ldpi,mdpi,hdpi, xhdpi.I want my wallpaper look good in home screens of both tablets and for large size screen mobiles.
Thank You.
3:4:6:8 , so if you have 600*480 in hdpi then it should go like this
3k:300*240
4k:400*320
6k:600*480
8k:800*640
but since there are multiple device with same dp but different screen size, you can never quitly fit for every device

Android - common techniques for scaling screen layouts

I realise this topic has been covered to death, and I have read the official and unofficial developer guides on it so know the theory. But I'm still unsure which path to take to ensure my app looks good on multiple screen sizes. My app is a simple navigation style app which is designed to be portrait only. At this stage I'm not interested in making different designs for landscape or multi-pane screens for tablets etc. I just want each screen to be scaled up/down so it looks in proportion with the screen size it is being displayed on - i.e. text and images are sized up/down as appropriate. I designed the app for a classic 480x800 hdpi device which it looks great on, I just want to make it look in proportion for the Galaxy S3/Nexus 7 etc. I'm already following these guidelines :
Using RelativeLayouts
Using DP units for padding/margins
Using SP units for fonts
Using 9-patch images for buttons
However I'm finding it still looks small and a bit lost in the middle of the screen on the larger devices. In particular, my main menu screen is a grid of 6 image buttons which I can't get to scale well. I don't want to have multiple copies to maintain of the same screen (normal/large/xlarge), just want one layout. I was considering the following :
Using value-normal/value-large etc. folders to store XML files with DP/SP values for sizes of images/text
Changing RelativeLayouts to LinearLayouts with weights (although I initially struggled with LinearLayouts and changed to RelativeLayouts
Are either of these valid approaches, or is there a better approach?
Personally, I would go with the first option. While this will work well for phones, it will make the layout seem somewhat bloated on tablets. Hence, another approach would be to create separate layouts for tablets and place them in the layout-large and layout-xlarge folders for 7" and 10" tablets respectively.

Android layout screen resolution problems

I have almost finished my app for android, the problem is when i test it on multiple screen sizes the layout of items such as padding etc, seems to be incorrect. I don't understand how I am supposed to support all screen sizes, because I have used all 'dp' values for the text and sizes for padding etc. I am using the 'background' as an image which fills the screen, and the background includes the layout of buttons and boxes that will have textviews overlaying them. I have been testing on my HTC desire and I have just noticed this issue. I assumed that it would all be okay seeing as I have been using dp for all measurments etc. Any tips to fix my layouts would be appreciated as my app is pretty much good to go apart from this :(
Read the following links very carefully you will get the best way to do:
Supporting Multiple Screens
Support for Multiple Screen Resolutions
Support for additional screen resolutions and densities in Android
compatible-screens
MultiResolution - Multiple Resolutions

Image Sizes and Android

I'm trying to create a splash screen of sorts for my Android App but am having problems getting the image to fill the screen (too tall, too skinny, etc). Instead of messing around recreating the image a million times to find the correct dimensions I was wondering if there is a "standard image size" that I should use for each screen density if I want it to properly fill the entire screen?
I would make the image stretchable using draw-9-patch. You will probably still need a few different image sizes but this way your images should be able to stretch without getting distorted for screen sizes you aren't expecting.
Yeah the Android docs has all of this relevant information in the: Supporting Multiple Screens section. There is a table in there that should specify all of the different screen sizes that you will need to account for.

Categories

Resources