ViewPager 详解(三)---PagerTabStrip与PagerTitleStrip添加标题栏的异同

来源:互联网 发布:数据流量怎么打开不了 编辑:程序博客网 时间:2024/04/30 22:12


看了别人源码:

<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:id="@+id/pager"    android:layout_width="match_parent"    android:layout_height="match_parent"    tools:context=".CyActivity" >    <!--    This title strip will display the currently visible page title, as well as the page    titles for adjacent pages.    -->    <android.support.v4.view.PagerTitleStrip        android:id="@+id/pager_title_strip"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_gravity="top"        android:background="#33b5e5"        android:paddingBottom="4dp"        android:paddingTop="4dp"        android:textColor="#fff" /></android.support.v4.view.ViewPager>

分页使用了ViewPager + PagerTitleStrip 实现的效果特别好,Viewpage的标题滚动效果,下边引用了名博的文章备份自己的学习轨迹:

http://blog.csdn.net/harvic880925/article/details/38521865







0 0
原创粉丝点击