Search code examples
androidmaterial-designandroid-xmlandroid-drawable

Android Layer List Drawable Move Adjust Item Position


How to positon the <item> inside <layer-list> Drawable? Thanks for any help.

<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android">

    <item
        android:drawable="@drawable/radio_uncheck" />    //24dp from vector assset

    <item
        android:drawable="@drawable/check_mark" />    //24dp from vector asset

</layer-list>

enter image description here


Solution

  • I finally choose to modify the SVG image to meet my needs, following is the process:

    1. Go to "https://materialdesignicons.com/" -> find image -> download SVG image.

    2. Go to "https://editor.method.ac/" -> "File" -> "Open SVG..." -> choose SVG file -> "Open".

    3. Adjust canvas width and height on the right panel.

    4. Adjust the positon of the imported SVG image.

    5. "File" -> "Save Image..." -> rename file -> "Download".

    6. Import the SVG image to Android Studio as vector asset.