B
B
ByRon2016-10-19 21:02:37
Android
ByRon, 2016-10-19 21:02:37

Where is it correct to set dp so that the interface on different screens increases / decreases?

In my converted SVG to XML, the sizes are indicated in dp, for icons, for shape (50dp), and where I put them

<ImageButton 
android:background="@drawable/item" 
android:layout_width="50dp"
/>

I also specify the dimensions in dp, on the phone I check 5" - well, it seems like on the layout, on the tablet 10" the same dimensions as on the phone, but with such a huge screen, my vectordrawavble and shapes remain the same as on the phone.
For example, the gradient on SplashScreen is equally beautiful on both the phone and the tablet, and VectorDrawables do not stretch.
How to correctly specify that the vector XML backgrounds for the controls themselves stretch depending on the screen, naturally proportionally?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question