关闭

想用RadioGroup做底部导航页,如何在上面加一条线?

238人阅读 评论(0) 收藏 举报
为了加那条线,我加了了一个imageview,,但是会有缝隙。。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
    android:layout_height="match_parent">


    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal"
        android:id="@+id/radiogroup">
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:drawableTop="@drawable/radiobutton_home_selector"
            android:textColor="@drawable/radiobutoon_home_text_selector"
            android:layout_marginLeft="20dp"
            android:textSize="15sp"
            android:gravity="center"
            android:text="@string/home"

            android:button="@null"/>


        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:drawableTop="@drawable/raidobutton_girdviw_selector"
            android:textColor="@drawable/radiobutton_girdview_text_selector"
            android:text="@string/girdview"
            android:button="@null"
            android:gravity="center"
            android:textSize="15sp"
            />

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:drawableTop="@drawable/radionbutton_internet_selector"
            android:textColor="@drawable/radiobutton_internet_text_selector"
            android:text="@string/internet"
            android:button="@null"
            android:gravity="center"
            android:textSize="15sp"
            />

    </RadioGroup>

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:id="@+id/imageView"
        android:background="@color/colorAccent"
        android:layout_above="@+id/radiogroup"
        android:layout_marginBottom="10dp"
        android:layout_centerHorizontal="true" />


</RelativeLayout>


新手求指点~~
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1031次
    • 积分:174
    • 等级:
    • 排名:千里之外
    • 原创:17篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档