1.activity_main
<android.support.v4.view.ViewPager
android:id="@+id/main_pager"
android:layout_width=“match_parent”
android:layout_height=“0dp”
android:layout_weight=“1”></android.support.v4.view.ViewPager>
<RadioButton
android:id="@+id/main_button2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/tab_gwc"
android:gravity="center"
android:textSize="19sp" />
<RadioButton
android:id="@+id/main_button3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/sel_r2"
android:gravity="center"
android:textSize="19sp" />
</RadioGroup>
2.注册
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/reg_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/back"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:layout_marginRight="35dp"
android:text="注册"
android:textSize="19sp" />
</LinearLayout>
<!--<view
android:layout_width="500dp"
android:layout_height="1px"
></view>-->
<EditText
android:id="@+id/reg_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
android:hint="请输入手机号" />
<EditText
android:id="@+id/reg_pwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
android:hint="请输入密码"
android:password="true" />
<Button
android:id="@+id/reg_reg"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:text="立即注册" />
3.fragment布局
01
<com.bw.week2_03.view.activity.Z_View
android:layout_width="match_parent"
android:layout_height="50dp" />
<com.bawei.swiperefreshlayoutlibrary.SwipyRefreshLayout
android:id="@+id/frag01_src"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</com.bawei.swiperefreshlayoutlibrary.SwipyRefreshLayout>
03
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:text="登录"
android:textSize="19sp" />
<EditText
android:id="@+id/frag03_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
android:hint="请输入手机号" />
<EditText
android:id="@+id/frag03_pwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
android:hint="请输入密码"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_margin="50dp"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/frag03_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="登录" />
<Button
android:id="@+id/frag03_reg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册" />
</LinearLayout>
///多条目布局
item1
item2
<TextView
android:id="@+id/title2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="哈哈哈"
/>
搜索的布局
<EditText
android:id="@+id/seek"
android:layout_width="0dp"
android:hint="请输入要搜索的商品"
android:gravity="center"
android:layout_weight="1"
android:layout_height="50dp" />
<Button
android:id="@+id/sou"
android:text="搜索"
android:gravity="center"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="50dp" />