I'm currently designing some ImageButtons to be drawn on top of a map, and one of them is supposed to bring up a list of currently favourited markers that would be permanently displayed on the map.
Apart from holding down the custom InfoWindow, a marker can be added to this list from a separate activity by clicking a button on the that activity's action bar, which for its icon uses the android vector asset named star_border.
Now, as the ImageButton's src, I would like to use a combination of the list vector asset and the star, which would sort of be in the bottom right, like a subscript.
Can this be done by editing together XML code, or do I use a third party program?
Asked
Active
Viewed 3,947 times
3

Andrew Turtledove
- 33
- 1
- 6
2 Answers
3
You may want to take a look at the <layer-list />
. With it you can stack multiple drawable. But scaling and centering is a pain on its own.

Xerusial
- 525
- 1
- 5
- 17
-
Although I moved onto a different project, thank you anyway :) – Andrew Turtledove Jun 18 '19 at 05:01
1
Create XML file under Drawable and put your SVG images as like that:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/your_image_first"
android:gravity="center"/>
<item
android:drawable="@drawable/your_image_second"
android:gravity="center"/>
</layer-list>

canerkaseler
- 6,204
- 45
- 38