Android:布局中的浮动条
有人知道如何添加一个浮动条,即使用户滚动浏览版面的内容,它也会停留在版面页面的顶部吗 只需将该条添加到布局顶部,并使用Android:布局中的浮动条,android,Android,有人知道如何添加一个浮动条,即使用户滚动浏览版面的内容,它也会停留在版面页面的顶部吗 只需将该条添加到布局顶部,并使用滚动视图包装其余内容即可。例如: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_wid
滚动视图
包装其余内容即可。例如:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Header -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Your header"/>
<!-- rest of your layout -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Foo"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Bar"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Baz"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="etc"/>
</ScrollView>
</LinearLayout>
这样,视图的包装部分将可滚动,而标题将保留在同一站点中。+1我需要类似的内容,但我需要底部的浮动弹出窗口,这是一个很好的起点!