【发布时间】:2015-04-14 17:42:24
【问题描述】:
我有一个主要包含 2 个组件的活动:滚动视图和按钮。 我想把按钮放在屏幕的底部,固定的。
我尝试了很多东西,但我无法将按钮位置固定在屏幕按钮上,因为随着滚动视图内容的增加,按钮被推到活动屏幕之外。
我想实现这样的目标:
谁能告诉我如何做到这一点?
我的 XML 文件是干净的(所有自定义视图都是以编程方式编写的,无法共享!):
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/scrollView"
android:layout_gravity="center_horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/editableViewGroup"></LinearLayout>
</ScrollView>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Save Changes"
android:id="@+id/customButton" />
【问题讨论】:
-
你能发布你的xml文件吗?
-
嘿@ikis 看这里:stackoverflow.com/questions/16912232/…
标签: android android-activity view