仿爱奇艺UI界面(第一天)

仿爱奇艺UI界面

1、整体布局

是一个Activity,再一个Activity界面中填充不同的Fragment。
主界面是一个LinearLayout布局,在布局中放一个FrameLayout用来做显示填充页面的布局,之后再放一个LinearLayout布局,
根据页面显示效果设置权重,在布局中放一个RadioGroup,盛放RadioButton的容器,设置5个RadioButton用来监听点击的页面。分别创建5个Fragment页面,为RadioGroup添加事件监听,在点击了按钮的时候,填充不同的页面。

布局代码如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.jinxudong.aiqiyiui.MainActivity$PlaceholderFragment" >

    <LinearLayout
        android:id="@+id/ll_flg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="6"
        android:orientation="horizontal" >
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal" >

        <RadioGroup
            android:id="@+id/btn_rg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/category_drag_bg"
            android:orientation="horizontal" >

            <RadioButton
                android:id="@+id/ib_home"
                style="@style/Bottom_Tab_Style"
                android:background="@null"
                android:drawableTop="@drawable/home_selector"
                android:text="@string/phone_navi_shipin" />

            <RadioButton
                android:id="@+id/ib_ib2"
                style="@style/Bottom_Tab_Style"
                android:background="@null"
                android:drawableTop="@drawable/ib2_selector"
                android:text="@string/phone_navi_find" />

            <RadioButton
                android:id="@+id/ib_ib3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@null"
                android:button="@null"
                android:drawablePadding="3dp"
                android:drawableTop="@drawable/ib3_selector"
                android:gravity="center"
                android:padding="5dp"
                android:text="@string/phone_navi_vip"
                android:textColor="@drawable/vip_text_selector" />

            <RadioButton
                android:id="@+id/ib_ib5"
                style="@style/Bottom_Tab_Style"
                android:background="@null"
                android:drawableTop="@drawable/rb5_selector"
                android:text="@string/me" />

            <RadioButton
                android:layout_gravity="center"
                android:id="@+id/ib_ib4"
                android:layout_width="80dp"
                android:layout_height="70dp"
                android:background="@drawable/ib4_selector"
                android:button="@null" />

        </RadioGroup>
    </LinearLayout>

</LinearLayout>

逻辑代码如下:

package com.jinxudong.aiqiyiui;

import com.example
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值