I'm creating a proportional UI, the thing is that - by different UI resolutions the UI-components get different shapes. I'm using image-text button, which for different resolutions have different dimensions. Could I do so, that开发者_如何学Python the image inside the button resize also proportional depending on button's width/height? (currently the image doesn't change its dimensions and just some parts of it are hidden).
Here is the xml-sorce, I'm using for such kind of button:
<Button
android:id="@+id/today"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/today"
android:drawablePadding="0sp"
android:gravity="center_horizontal|bottom"
android:textSize="8sp"
android:text="@string/today"
android:onClick="getRSSNews"
/>
Try to create mdpi and ldpi drawables too (with same name) and see how will that work.
精彩评论