问题
我需要在我的Activity中给滚动事件设置一些优先级。
我正在使用aiCharts(图表库),并需要在我的区域上进行缩放、平移等操作。如果没有任何ScrollViews
,它运作得很好,但是,如果我使用了上述的Layout
,这些功能就会出现问题。我认为这是因为视图优先级的原因。
可能的解决方案
我尝试在需要位于ScrollView
和HorizontalScrollView
“顶部”的视图上使用setOverScrollMode(View.OVER_SCROLL_ALWAYS);
,但效果不佳。
布局
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/screen_relative_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>
我的所有视图都是通过编程方式添加到RelativeLayout中的。