Resize dp as opposed to pixels recommended for different screen sizes?

Say for ImageButton on screen A (240X320: ldpi) and screen B (720X1280: xhdpi) it is recommended to manually change the dp size (layout-width and height) in each unique layout resource file for different screens? Or create scaled bitmaps with nine patches for each dpi image size, call it in a resource file that you can extract, and then set it as src for ImageButton?

To justify, here is what I mean: https://www.youtube.com/watch?v=OtsZbdbC370 ... Most likely the video is out of date, right?

0
android xml pixel bitmap
source share
1 answer

It is up to you if you want to change the width and height of the layout (in dp) of the image. Of course, there is nothing wrong with adjusting the width and height of the imageButton element or any user interface element, in this case, in each unique layout resource file for different screens. Did you have a specific code that you would like feedback on?

+1
source share

All Articles