随手笔记

来源:互联网 发布:淘宝运营名词解释 编辑:程序博客网 时间:2024/04/30 10:47

TextView

  <TextView
            android:id="@+id/text3"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:gravity="center"    ---------显示在内框中央          
            android:text="页卡3"
            android:textColor="#000000"
            android:textSize="22.0dip" />

ViewPager

 <android.support.v4.view.ViewPager
        android:id="@+id/vPager"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_weight="1.0"
        android:background="#000000"
        android:flipInterval="30"     //指定每个View动画之间的时间间隔
        android:persistentDrawingCache="animation"   //指定缓存策略

/>

获取布局管理器

LayoutInflater mInflater = getLayoutInflater();

//除去标题

requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(R.layout.main);

原创粉丝点击