Android基于ViewPager Fragment实现选项卡

2019-12-10 19:50:37王旭
  • android:layout_height="wrap_content"  android:orientation="horizontal">  
  • <TextView   android:id="@+id/tv_guid1" 
  • android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  • android:layout_weight="1.0"  android:gravity="center" 
  • android:text="特性1"  android:textSize="18sp"/>  
  • <TextView   android:id="@+id/tv_guid2" 
  • android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  • android:layout_weight="1.0"  android:gravity="center" 
  • android:text="特性2"  android:textSize="18sp"/>  
  • <TextView   android:id="@+id/tv_guid3" 
  • android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  • android:layout_weight="1.0"  android:gravity="center" 
  • android:text="特性3 "  android:textSize="18sp"/>  
  • <TextView   android:id="@+id/tv_guid4" 
  • android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  • android:layout_weight="1.0"  android:gravity="center" 
  • android:text="特性4"  android:textSize="18sp"/>  
  • </LinearLayout>   <ImageView  
  • android:id="@+id/cursor"  android:layout_width="wrap_content" 
  • android:layout_height="wrap_content"  android:scaleType="matrix" 
  • android:src="@drawable/cursor"/>   <android.support.v4.view.ViewPager  
  • android:id="@+id/viewpager"  android:layout_width="fill_parent" 
  • android:layout_height="fill_parent"  android:flipInterval="30" 
  • android:persistentDrawingCache="animation"/>   </LinearLayout>