关于android:scrollbarStyle属性 分类: Android开发 2014-05-30 10:57 50人阅读 评论(0) 收藏
http://blog.csdn.net/duanyipeng/article/details/8591575
3. 相关说明:
insideInset、insideOverlay、outsideInset、outsideOverlay分别对应上图右边解释!
1. activity_maim.xml
[html] view
plaincopy
-
<</span>LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" -
android:layout_width="fill_parent" -
android:layout_height="fill_parent" -
android:orientation="vertical" > -
-
<</span>ScrollView -
android:id="@+id/view1" -
android:layout_width="100dip" -
android:layout_height="120dip" -
android:background="@android:color/white" -
android:padding="8dip" -
android:scrollbarStyle="insideOverlay" > -
-
<</span>TextView -
android:layout_width="fill_parent" -
android:layout_height="wrap_content" -
android:background="@android:color/darker_gray" -
android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text" -
android:textColor="#ffffff" /> -
</</span>ScrollView> -
-
<</span>ScrollView -
android:id="@+id/view2" -
android:layout_width="100dip" -
android:layout_height="120dip" -
android:background="@android:color/white" -
android:padding="8dip" -
android:scrollbarStyle="insideInset" > -
-
<</span>TextView -
android:layout_width="fill_parent" -
android:layout_height="wrap_content" -
android:background="@android:color/darker_gray" -
android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text" -
android:textColor="#ffffff" /> -
</</span>ScrollView> -
-
<</span>ScrollView -
android:id="@+id/view3" -
android:layout_width="100dip" -
android:layout_height="120dip" -
android:background="@android:color/white" -
android:padding="8dip" -
android:scrollbarStyle="outsideOverlay" > -
-
<</span>TextView -
android:layout_width="fill_parent" -
android:layout_height="wrap_content" -
android:background="@android:color/darker_gray" -
android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text" -
android:textColor="#ffffff" /> -
</</span>ScrollView> -
-
<</span>ScrollView -
android:id="@+id/view4" -
android:layout_width="100dip" -
android:layout_height="120dip" -
android:background="@android:color/white" -
android:padding="8dip" -
android:scrollbarStyle="outsideInset" > -
-
<</span>TextView -
android:layout_width="fill_parent" -
android:layout_height="wrap_content" -
android:background="@android:color/darker_gray" -
android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text" -
android:textColor="#ffffff" /> -
</</span>ScrollView> -
-
</</span>LinearLayout>
![关于android:scrollbarStyle属性](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
3. 相关说明:
![关于android:scrollbarStyle属性](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
insideInset、insideOverlay、outsideInset、outsideOverlay分别对应上图右边解释!
版权声明:本文为博主原创文章,未经博主允许不得转载。