announcements_view.xml 2.6 KB
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="280dp"
        android:layout_height="320dp"
        android:layout_gravity="center"
        android:background="@drawable/main_card_bg"
        android:gravity="center"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            android:weightSum="5">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center_vertical">

                <ImageButton
                    android:id="@+id/back_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackgroundBorderless"
                    android:padding="4dp"
                    android:src="@drawable/ic_back" />
            </LinearLayout>

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:text="游戏公告"
                android:textAlignment="center"
                android:textColor="@android:color/black"
                android:textSize="18sp" />

            <Space
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        </LinearLayout>

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

            <ProgressBar
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center" />
        </FrameLayout>

        <ListView
            android:id="@+id/announcements_lv"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:visibility="gone" />
    </LinearLayout>
</FrameLayout>