分类:
android
android实现屏幕上下滚动有个ScrollView控件,拖动控件自带LinearLayout, 把需要滑动的页面放在LinearLayout其下即可。
<ScrollView android:id="@+id/scrollView2" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> </LinearLayout> </ScrollView>
要注意的是:底部控件高度不要设置具体值,设置具体高度滑动无效果。让它wrap_content自适应即可。
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739
评价