【发布时间】:2018-04-08 18:25:29
【问题描述】:
当 Activity 有 ScrollView 组件时,有没有办法使用一些不可滚动的视图?
我希望我的按钮的行为类似于下面问题中的按钮,我也希望它固定在 UI 的底部:
how to set a button at a fixed location on the bottom of UI?
这是我的布局代码:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent ">
<FrameLayout
android:id="@+id/map_frameview"
android:layout_width="match_parent"
android:layout_height="200dp">
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="20dp">
</LinearLayout>
</LinearLayout>
</ScrollView>
提前致谢!
【问题讨论】:
-
让按钮远离 ScrollView 并将其定位在底部。
标签: android android-scrollview