大佬教程收集整理的这篇文章主要介绍了android – 当HorizontalScrollView的中心元素不足以使其滚动时,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
| Element 1 Element 2 | <- edge of screen
代替:
| Element 1 Element 2 | <- edge of screen
同时仍然能够:
| Element 1 Element 2 Element 3 Element 4 Elem| <- edge of screen Now scrolling
布局XML是:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://scheR_317_11845@as.android.com/apk/res/android" android:id="@+id/mainLinearLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="25dp" > </TextView> <ScrollView android:id="@+id/scroll1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" > <LinearLayout android:id="@+id/contentLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > </LinearLayout> </ScrollView> <horizontalscrollview android:id="@+id/horizontalscrollview1" android:layout_width="fill_parent" android:layout_height="30dp"> <LinearLayout android:id="@+id/footerLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > </LinearLayout> </horizontalscrollview> </LinearLayout>
下面的XML被充满footerLayout:
<?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://scheR_317_11845@as.android.com/apk/res/android" android:id="@+id/footer_content" android:textSize="18sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingLeft="5dp" android:paddingRight="5dp" android:text="FOOTER" android:singleLine="true" />
任何帮助将不胜感激.
<horizontalscrollview android:id="@+id/svExample" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layouT_Below="@id/rlExample"> <LinearLayout android:id="@+id/llExample" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> </LinearLayout> </horizontalscrollview >
以上是大佬教程为你收集整理的android – 当HorizontalScrollView的中心元素不足以使其滚动时全部内容,希望文章能够帮你解决android – 当HorizontalScrollView的中心元素不足以使其滚动时所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。