custom_titlebar_layout.xml
3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/rmrb_dp44"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- 左侧按钮开始 -->
<RelativeLayout
android:id="@+id/title_bar_left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="@dimen/rmrb_dp8"
android:paddingEnd="@dimen/rmrb_dp20">
<ImageView
android:id="@+id/title_bar_left_img"
android:layout_width="@dimen/rmrb_dp36"
android:layout_height="@dimen/rmrb_dp36"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/title_bar_left_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:visibility="gone" />
</RelativeLayout>
<!-- 左侧按钮结束 -->
<!-- 中间文字开始 -->
<RelativeLayout
android:id="@+id/title_bar_center"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true">
<com.wd.foundation.wdkit.view.MarqueeTextView
android:id="@+id/title_bar_center_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="marquee"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center"
android:textStyle="bold"
android:marqueeRepeatLimit="marquee_forever"
android:singleLine="true"
android:textColor="@color/color_333333"
android:textSize="@dimen/rmrb_dp18" />
</RelativeLayout>
<!-- 中间文字结束 -->
<!-- 右侧按钮开始 -->
<RelativeLayout
android:id="@+id/title_bar_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:paddingStart="@dimen/rmrb_dp20"
android:paddingEnd="@dimen/rmrb_dp8">
<ImageView
android:id="@+id/title_bar_right_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:visibility="gone" />
<TextView
android:id="@+id/title_bar_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true" />
</RelativeLayout>
<!-- 右侧按钮结束 -->
</RelativeLayout>
<View
android:id="@+id/title_line"
style="@style/title_line_transverse" />
</LinearLayout>