问题
I have a layout as follows:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" >
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- children -->
</LinearLayout>
</FrameLayout>
The LinearLayout
has no background and neither do any of its children. I can see the white View
beneath the LinearLayout
on Ice Cream Sandwich devices but not on Gingerbread devices. Anyone know why this might be and what I can do about it??
Note: I'm not setting the background of the
LinearLayout
to be white as what I really need to do is perform some animations on theView
object.
来源:https://stackoverflow.com/questions/17590776/framelayout-z-order-not-behaving-as-expected-on-gingerbread