【发布时间】:2015-11-25 06:02:37
【问题描述】:
我有这样的 FrameLayout:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="changeColor"
android:text="new button"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="some text"/>
</FrameLayout>
问题是按钮显示在顶部,而 FrameLayout 类概述告诉我们:“子视图绘制在堆栈中,最近添加的子视图位于顶部”。
【问题讨论】:
-
你可以使用线性布局
标签: android android-framelayout