3
我想为第一个ImageView
元素设置一些属性,然后继承其他元素的属性。如何继承android xml中的字段?
以下不起作用,但可能有类似的东西?
<ImageView
android:id="@+id/myimage"
android:layout_height="100dp"
android:layout_width="100dp"/>
<ImageView
android:id="@+id/myimage2"
android:layout_height="@myimage/layout_height"
android:layout_width="@myimage/layout_width"/>
你必须创建在'dimens.xml'资源这会在'资源> values'和使用,无论哪个XML元素你想要 – shadygoneinsane
所以我不能在同一个文件中进行交叉引用? – membersound
你可以为它制作风格。 –