0
votes

I have created on android application.Here i am using some button and images on this project, My problem is,

i don't know how to mention the sizes for each buttons and images for the below folders on my android project.

drawable-> drawable-hdpi drawable-mdpi drawable-xhdpi drawable-ldpi

** if i use the same size of button & images for every folders my app's layout is unfit.why? Is there any standard way of mentioning sizes for button and images?

suggestions please

Thanks for your precious time !..

2

2 Answers

0
votes

Try to create background of your buttons as nine-patch image, and then place them in drawable folder.

About supporting different screens try to read this

0
votes
<Button 
android:id="@+id/button"
android:layout_width="50dp"
android:layout_height="25dp"
android:gravity="center"
android:text="Button"
android:textSize="12dp"/>

just give layout_width, layout_height values in your xml. And follow the same to ImageView also