fragment_rank.xml 8.24 KB
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:appNs="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/layout_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:orientation="horizontal"
            android:weightSum="4">

            <Button
                android:id="@+id/btn_daily"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="デイリー" />

            <Button
                android:id="@+id/btn_weekly"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="週間" />

            <Button
                android:id="@+id/btn_monthly"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="月間" />

            <Button
                android:id="@+id/btn_yearly"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="年間" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:gravity="center_vertical">

            <ImageView
                android:id="@+id/btn_back"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_centerVertical="true"
                android:layout_marginLeft="8dp"
                android:padding="2dp"
                android:scaleType="fitCenter"
                android:src="@drawable/back_ic" />

            <TextView
                android:id="@+id/tv_start_date"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:layout_toLeftOf="@+id/tv_center"
                android:layout_toRightOf="@+id/btn_back"
                android:gravity="center"
                android:text="2016年 1月22日"
                android:textColor="@android:color/white"
                android:textSize="14sp" />

            <TextView
                android:id="@+id/tv_center"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:gravity="center"
                android:text="-"
                android:textColor="@android:color/white"
                android:textSize="18sp" />

            <TextView
                android:id="@+id/tv_end_date"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:layout_toLeftOf="@+id/btn_next"
                android:layout_toRightOf="@+id/tv_center"
                android:gravity="center"
                android:text="2017年 1月21日"
                android:textColor="@android:color/white"
                android:textSize="14sp" />

            <ImageView
                android:id="@+id/btn_next"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="8dp"
                android:padding="2dp"
                android:scaleType="fitCenter"
                android:src="@drawable/next_ic" />
        </RelativeLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:orientation="horizontal"
            android:weightSum="4">

            <Button
                android:id="@+id/btn_walk"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="walk" />

            <Button
                android:id="@+id/btn_run"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="run" />

            <Button
                android:id="@+id/btn_bike"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="Bike" />

            <Button
                android:id="@+id/btn_all"
                style="@style/button_normal_style"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/button_background"
                android:text="All" />
        </LinearLayout>
    </LinearLayout>

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipe_ranking"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/layout_bottom"
        android:layout_below="@+id/layout_top">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rcv_rank"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </android.support.v7.widget.RecyclerView>
    </android.support.v4.widget.SwipeRefreshLayout>

    <LinearLayout
        android:id="@+id/layout_bottom"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal"
        android:weightSum="4">

        <Button
            style="@style/button_normal_style"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/button_background"
            android:lines="2"
            android:text="カテゴリー別ランキング" />

        <Button
            style="@style/button_normal_style"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/button_background"
            android:lines="2"
            android:text="グループ対抗ランキング" />

        <Button
            style="@style/button_normal_style"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/button_background"
            android:lines="2"
            android:text="グループ内ランキング" />

        <Button
            style="@style/button_normal_style"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/button_background"
            android:lines="2"
            android:text="その他" />
    </LinearLayout>
</RelativeLayout>