viewpager的布局代码

 

1、dot控件

<View
        android:id="@+id/dot"
        android:layout_width="8dp"
        android:layout_height="8dp"
        android:layout_margin="8dp"
        android:background="@drawable/dot_nolmal"
        />

2、dot要设置的背景布局(在res---新建xml-file--选中drawbale,shape)

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
    
    <solid android:color="#000"/>
    <corners android:radius="8dp"/>

</shape>

posted on 2016-01-19 10:11  IT心得  阅读(172)  评论(0编辑  收藏  举报