里面的FrameLayout滚动视图不working.I添加滚动视图框架布局内。但滚动不工作..是有没有其他可能的方式?..请建议我滚动视图无法正常工作
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout android:id="@+id/maintable"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1" >
</TableLayout>
</HorizontalScrollView>
</ScrollView>
</FrameLayout>
</RelativeLayout>
可能是因为HorizontalScrollView窃取了触摸事件。你有没有尝试删除HorizontalScrollView? – MatPag
我已经尝试..不工作 – Karthik
作为第一件事,将所有“fill_parent”更改为“match_parent”,因为fill_parent已弃用。作为第二件事,问题可能是ScrollView的高度。在这种情况下,真正有用的设置不同的颜色到每个布局的背景,以查看他们的开始和结束的位置,或者使用Android布局设计器中的新蓝图功能,从AS 2.3 – MatPag