Skip to content Skip to sidebar Skip to footer

Resizing A Bitmap In Xml

For my splash screen I use a style with has a drawable defined as xml. There I'm using a bitmap to include the picture.

Solution 1:

This approach requires a higher API level (23 maybe?) but it'll do exactly what you want.

<itemandroid:height="200dp"android:width="200dp"android:drawable="@drawable/splash_logo"android:gravity="center"></item>

Edit the width/height to be whatever you need.

Post a Comment for "Resizing A Bitmap In Xml"