I cannot override attributes when using <include> in my Android layout files. When I searched for errors, I found Declined Issue 2863 :
"enable tag (violating layout settings never works)
Since Romain points out that this works in test suites and examples, I should be doing something wrong.
My project is organized as follows:
res/layout buttons.xml res/layout-land receipt.xml res/layout-port receipt.xml
There is something like this in the buttons.xml file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <Button .../> <Button .../> </LinearLayout>
Both the portrait and landscape receipt.xml files look something like this:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> ... <include android:id="@+id/buttons_override" android:background="#ff0000" android:layout_width="fill_parent" layout="@layout/buttons"/> </LinearLayout>
What am I missing?
android android widget
Eric Burke Apr 13 '10 at 17:10 2010-04-13 17:10
source share