use*_*772 2 xml android scroll android-layout
我在我的Android应用程序上有一个FrameLayout,但是我无法使这个布局的一部分可滚动...我已经尝试了一些解决方案来解决这个问题,但我找不到补丁!实际上,我希望在Scrollview标签之间看到可滚动的线性布局(可能是不需要linearlayout).
这是我的xml:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.robertot.timereport.com.robertot.timereport.Pages.YearlyStatFragment">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
// Some views to scroll
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/bottom_linear"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:layout_gravity="bottom"
style="@android:style/Widget.Holo.Light.ActionBar.Solid">
<Spinner
android:id="@+id/spnYearY"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"/>
<ImageButton
android:id="@+id/btnFilter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_search"
android:background="@null"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
</LinearLayout>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
谢谢!!:)
小智 5
在FrameLayout中,所有内容视图都是一个在另一个上面,因此正常行为是线性布局隐藏了前一个Scrollview的一部分.为什么不使用LinearLayout或相对布局而不是FrameLayout?
| 归档时间: |
|
| 查看次数: |
4273 次 |
| 最近记录: |