Reputation: 141
I am developing android applications from last four months, but still i am not able to design UI which will support for maximum screens. What should be my ideal layout and drawable structure and what is the good way should i follow to achieve it. Please help me.
Thanks in advance.
Upvotes: 0
Views: 3094
Reputation: 1
My favorite way to do it is using sdp.
Getting Started- To add sdp to your project (Using Android Studio and Gradle):
add implementation 'com.intuit.sdp:sdp-android:1.1.0' to your build.gradle dependencies block.
for example:
dependencies {
implementation 'com.intuit.sdp:sdp-android:1.1.0'
}
For more info you can refer- https://github.com/intuit/sdp
Upvotes: 0
Reputation: 839
Best way to implement Fragment
And also use import any icon with the following steps
Right click on Project
select ->new -> other..
Then choose Android Icon Set
Launcher Icons, Icon Name
so on...
You can follow this tutorial http://www.vogella.com/tutorials/AndroidFragments/article.html
Upvotes: 0
Reputation: 2113
I'll quote the top answer of this thread which is pretty much equal to your question.
That may not be possible. However you can look at these links and learn how to provide different images(pixels and density), layouts and further on. It may not be possible to make a userinterface on a low level density screen the same way as a high density screen and then you can target different layouts to different phones e.g.
You should also have a look at this: Best practice supporting multiple screens.
Although it is possible you should focus on a few main densities/screen sizes which you will support. Test these and make sure they work as you want them to do. It will be very much work to support all varieties and may not pay off because only few phones use specific sizes.
Upvotes: 1
Reputation: 4387
Use RelativeLayout
or LinearLayout
with weights. So that you get same view on most on screens. You can use one copy of images with good resolution in drawable
folder that can adjust on most screens or different sizes images in different drawable
folders but its increase your app size. But its always good practise to create layout depend on different sizes and some layouts based on height and width.
Upvotes: 1
Reputation: 258
Well the best way to do that will be: the same icon with different sizes and put them in order in the(these are order from smaller sizes to bigger sizes):
Th OS will automatically get you the best icon to fit the screen. Obviously if you want to run your apps in tablets as well it will be extremely hard to achieve a layout that can be compatible with thousands of devices available on the market. For that you can create different layout folders and create several of them for different screen sizes.
For more info you should definitely see this dev page: http://developer.android.com/guide/practices/screens_support.html
Hope this helps
Upvotes: 1