0

我有这个 xml 可绘制对象:

   <?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:id="@+map/marker_frame" 
            android:drawable="@drawable/map_pointer_green"/>
        <item android:id="@+map/marker_profile_picture" 
            android:drawable="@drawable/questionmark"/>
    </layer-list>

如何从代码中更改项目属性?我怎样才能访问它的ID?

我希望能够根据场景从代码中更改每个可绘制对象。

4

1 回答 1

0

如果在代码中使用LayerDrawable会怎样

于 2012-09-10T07:49:12.413 回答