漫画城布局

漫画城布局

导航页

<RelativeLayout 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.support.v4.view.ViewPager
        android:id="@+id/vp"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
         />

    <Button
        android:id="@+id/button1"
        android:onClick="btn"
        android:visibility="invisible"                           //显示隐藏
        android:layout_width="180dp"
        android:layout_height="60dp"
        android:layout_alignBottom="@+id/vp"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="47dp"
        android:background="@drawable/butt"
        />

</RelativeLayout>

主页

<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=".SecondActivity" >

    <FrameLayout
        android:id="@+id/fl"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" >
    </FrameLayout>

    <RadioGroup
        android:id="@+id/rg1"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        
        android:background="@drawable/frag1"
        android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/radio1"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:gravity="center"
            android:button="@null"
            android:checked="true"
            android:layout_weight="1"
            android:textColor="#fff"
            android:textSize="20sp"
            android:text="首页" />

        <RadioButton
            android:id="@+id/radio2"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:gravity="center"
            android:layout_weight="1"
            android:button="@null"
            android:textColor="#fff"
            android:textSize="20sp"
            android:text="分类" />

        <RadioButton
            android:id="@+id/radio3"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:gravity="center"
            android:layout_weight="1"
            android:button="@null"
            android:textColor="#fff"
            android:textSize="20sp"
            android:text="更新" />

        <RadioButton
            android:id="@+id/radio4"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:gravity="center"
            android:layout_weight="1"
            android:button="@null"
            android:textColor="#fff"
            android:textSize="20sp"
            android:text="搜索" />

        <RadioButton
            android:id="@+id/radio5"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:gravity="center"
            android:layout_weight="1"
            android:button="@null"
            android:textColor="#fff"
            android:textSize="20sp"
            android:text="我的" />
    </RadioGroup>

</LinearLayout>

轮播小圆点

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    
    <corners android:radius="8dp"/>
    <solid android:color="#252323"/>
<size
    android:width="10sp"
    android:height="10sp"
    />
</shape>

图片无边距

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        android:src="@drawable/sn1" />

</LinearLayout>

无限轮播布局

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    
    <android.support.v4.view.ViewPager
            android:id="@+id/vpimg"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <LinearLayout
            android:id="@+id/llt"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:background="#252323"
            android:layout_alignParentBottom="true"
            android:orientation="vertical" >

            <LinearLayout
                android:id="@+id/lin"
                android:layout_width="match_parent"
                android:layout_height="30dp"
                android:gravity="center"
                android:orientation="horizontal" >
            </LinearLayout>

        </LinearLayout>

</RelativeLayout>




你可能感兴趣的:(漫画城布局)