请教一下安卓开发仿微信的UI布局大概是怎么布局的?谢谢。在网上查了很多资料,感觉有点乱。
我做的是上面Fragment ,下面是RadioLayout,具体代码:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<FrameLayout
android:id="@+id/frame"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="0dp"/>
<RadioGroup
android:id="@+id/Rg"
android:layout_width="fill_parent"
android:layout_height="40px"
android:orientation="horizontal"
android:background="#000000">
<RadioButton
android:button="@null"
android:id="@+id/rb1"
android:text="微信"
android:gravity="center_horizontal|bottom"
android:layout_weight="1"
android:layout_width="0dp"
android:textColor="#ffffff"
android:textSize="20sp"
android:layout_height="fill_parent"/>
<RadioButton
android:gravity="center_horizontal|bottom"
android:button="@null"
android:id="@+id/rb2"
android:text="通讯录"
android:layout_weight="1"
android:layout_width="0dp"
android:textColor="#ffffff"
android:textSize="20sp"
android:layout_height="fill_parent"/>
<RadioButton
android:gravity="center_horizontal|bottom"
android:button="@null"
android:id="@+id/rb3"
android:text="发现"
android:layout_weight="1"
android:layout_width="0dp"
android:textColor="#ffffff"
android:textSize="20sp"
android:layout_height="fill_parent"/>
<RadioButton
android:gravity="center_horizontal|bottom"
android:button="@null"
android:id="@+id/rb4"
android:text="我"
android:layout_weight="1"
android:layout_width="0dp"
android:textColor="#ffffff"
android:textSize="20sp"
android:layout_height="fill_parent"/>
</RadioGroup>
上面是Fragment , 下面是使用普通的线性布局 ,平分就可以的。
实现微信的那个布局呢,所有的?
自己一个一个堆到xml里面就行了。
不好意思写错了RadioGroup
如果你需要左右滑动,可以使用Viewpager和radiogroup,RadioButton
基本功,多看看,多学学就行,不用太在意