0

I have placed the icons in each drawable folder. but the icons appear small on 8 inch tablet and large on 5 inch mobile handset. Is it the fault on android code side or design side? The size of icons in folders are:

x_grey.png 38x38 in drawable-hdpi
x_grey.png 25x25 in drawable-mdpi 
x_grey.png 50x50 in drawable-xhdpi 
x_grey.png 75x75 in drawable-xxhdpi
x_grey.png 100x100 in drawable-xxxhdpi
Hammad Ali Khan
  • 138
  • 1
  • 11
  • Share your layout file also. – wali Sep 26 '18 at 07:27
  • Android layout are responsive, and [they work in terms of dp](https://developer.android.com/training/multiscreen/screensizes), so in terms not of absolute pixels but in terms of density of pixels. So, no matter about the actual sizes of your assets, you will bind them to a layout view, so it depends on how you define this view. For instance, if you want to accomplish a given size [throughtout all the screens](https://developer.android.com/training/multiscreen/screendensities), simply set the view width and height as (for example) 38dp. – Alessio Sep 26 '18 at 07:32
  • Just a suggestion i think it will help you. https://stackoverflow.com/a/17647733/8867253 – Shahnawaz Khan Sep 26 '18 at 07:36
  • for tablets you need to make different draw able i.e layout-sw600dp or layout-large, layout-sw720dp or layout-xlarge. – Syed Hamza Hassan Sep 26 '18 at 07:44

1 Answers1

0

I hope this will work for you.

Make your icon in below sizes.

For hdpi-72x72

For mdpi-48x48

For xhdpi-96x96

For xxhdpi-144x144

For xxxhdpi-192x192

and for tablet make different layout folder.

folder names are (layout-sw600dp or layout-large ) and (layout-sw720dp or layout-xlarge) and put in res folder.

GParekar
  • 1,209
  • 1
  • 8
  • 15