我的drawables中有这个图层列表文件。我想知道如何抵消覆盖在形状项上的图标。我目前将重力设置为居中,但有没有办法偏离中心?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- background shape -->
<item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<solid android:color="#ff000000"/>
<stroke android:width="2px" android:color="#ffffffff" />
</shape>
</item>
<!--
icon that overlays the background shape; this icon
has gravity set to center, but how can I change offset
from center?
-->
<item
android:drawable="@drawable/ic_wifi_on_angled"
android:width="40dp"
android:height="40dp"
android:gravity="center">
<padding android:left="100dp"/>
</item>
</layer-list>