zftlive/res/layout/common_title_bar.xml

105 lines
3.6 KiB
XML

<?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="@dimen/common_title_height"
android:background="@color/actionbar_bg" >
<!-- 左边按钮容器 -->
<LinearLayout
android:id="@+id/ll_left_btns"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:gravity="left|center_vertical"
android:orientation="horizontal" >
<!-- 菜单按钮 -->
<ImageButton
android:id="@+id/iv_menu"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@drawable/selector_common_transparent_btn"
android:contentDescription="@null"
android:scaleType="center"
android:visibility="gone"
android:src="@drawable/ic_list_white_48dp" />
<!-- 返回按钮 -->
<ImageButton
android:id="@+id/iv_back"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@drawable/selector_common_transparent_btn"
android:contentDescription="@null"
android:scaleType="center"
android:visibility="invisible"
android:src="@drawable/selector_common_back_white_btn" />
</LinearLayout>
<!-- 标题 -->
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="6.67dp"
android:layout_toLeftOf="@+id/ll_right_btns"
android:layout_toRightOf="@+id/ll_left_btns"
android:ellipsize="end"
android:gravity="left|center_vertical"
android:singleLine="true"
android:text=""
android:textColor="@color/white"
android:textSize="20sp" />
<!-- 右侧按钮容器 -->
<LinearLayout
android:id="@+id/ll_right_btns"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="right|center_vertical"
android:orientation="horizontal" >
<!-- 收藏按钮 -->
<CheckBox
android:id="@+id/cb_fav"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@drawable/selector_common_fav_white_btn"
android:button="@drawable/selector_common_transparent_btn"
android:checked="false"
android:textColor="#666666"
android:textSize="16.67sp"
android:visibility="gone" />
<!-- 分享按钮 -->
<CheckBox
android:id="@+id/cb_share"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@drawable/selector_common_share_white_btn"
android:button="@drawable/selector_common_transparent_btn"
android:checked="false"
android:textColor="#666666"
android:textSize="16.67sp"
android:visibility="gone" />
</LinearLayout>
<!-- 底部线 -->
<View
android:id="@+id/title_buttom_line"
android:layout_width="match_parent"
android:layout_height="0.33dp"
android:layout_alignParentBottom="true"
android:background="#dddddd"
android:visibility="gone" />
</RelativeLayout>