Android基于ViewPager Fragment实现选项卡

2019-12-10 19:50:37王旭
  • }  }</string,></string,></string,></string,></string,></string,></string,></string,></fragment></fragment> 

    4.分别新建lay1.xml、 lay2.xml 、lay3.xml

    lay1.xml

     

     
    1. <!--?xml version="1.0" encoding="utf-8"?-->  <linearlayout xmlns:android="http://www.easck.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#fff" android:orientation="vertical"> 
    2. <textview android:id="@+id/tv_hello" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:visibility="gone">  <listview android:id="@+id/listView3" android:layout_width="match_parent" android:layout_height="wrap_content" android:cachecolorhint="@android:color/transparent" android:divider="@drawable/reader_item_divider" android:listselector="@android:color/transparent"> 
    3. </listview>  </textview></linearlayout>