Skip to content

Commit 46eae50

Browse files
committed
封装LiveDataBus
1 parent 4781ab7 commit 46eae50

File tree

1 file changed

+50
-46
lines changed

1 file changed

+50
-46
lines changed

app/src/main/res/layout/activity_common_search.xml

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,69 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<layout xmlns:tools="http://schemas.android.com/tools"
3-
xmlns:android="http://schemas.android.com/apk/res/android">
2+
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
44

55
<data>
6-
<variable name="searchModel" type="com.fmt.github.home.model.SearchModel"/>
6+
7+
<variable
8+
name="searchModel"
9+
type="com.fmt.github.home.model.SearchModel" />
710
</data>
811

912
<LinearLayout
10-
android:orientation="vertical"
11-
android:layout_width="match_parent"
12-
android:layout_height="match_parent">
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent"
15+
android:orientation="vertical">
1316

1417
<LinearLayout
15-
android:layout_width="match_parent"
16-
android:layout_height="@dimen/dp_48"
17-
android:background="@color/colorPrimary">
18+
android:layout_width="match_parent"
19+
android:layout_height="@dimen/dp_48"
20+
android:background="@color/colorPrimary">
1821

19-
<ImageButton
20-
android:id="@+id/iv_back"
21-
android:layout_width="wrap_content"
22-
android:layout_height="wrap_content"
23-
android:src="@mipmap/icon_back"
24-
android:layout_gravity="center_vertical"
25-
android:paddingStart="@dimen/dp_15"
26-
android:background="@null"/>
22+
<androidx.appcompat.widget.AppCompatImageButton
23+
android:id="@+id/iv_back"
24+
android:layout_width="wrap_content"
25+
android:layout_height="wrap_content"
26+
android:layout_gravity="center_vertical"
27+
android:background="@null"
28+
android:paddingStart="@dimen/dp_15"
29+
android:src="@mipmap/icon_back" />
2730

28-
<EditText
29-
android:id="@+id/mSearchEt"
30-
android:layout_width="@dimen/dp_0"
31-
android:layout_weight="1"
32-
android:layout_height="40dp"
33-
android:layout_marginStart="@dimen/dp_10"
34-
android:layout_marginEnd="@dimen/dp_10"
35-
android:singleLine="true"
36-
android:textColorHint="@color/repos_search_text_color"
37-
android:textColor="@color/repos_search_text_color"
38-
android:background="@drawable/selector_search_exittext_bg"
39-
android:imeOptions="actionSearch"
40-
android:maxLines="1"
41-
android:text="@={searchModel.searchKey}"/>
31+
<androidx.appcompat.widget.AppCompatEditText
32+
android:id="@+id/mSearchEt"
33+
android:layout_width="0dp"
34+
android:layout_height="44dp"
35+
android:layout_marginStart="@dimen/dp_10"
36+
android:layout_marginEnd="@dimen/dp_10"
37+
android:layout_gravity="center_vertical"
38+
android:layout_weight="1"
39+
android:background="@drawable/selector_search_exittext_bg"
40+
android:imeOptions="actionSearch"
41+
android:maxLines="1"
42+
android:singleLine="true"
43+
android:text="@={searchModel.searchKey}"
44+
android:textColor="@color/repos_search_text_color"
45+
android:textColorHint="@color/repos_search_text_color" />
4246

4347
<TextView
44-
android:id="@+id/mSortTv"
45-
android:layout_width="wrap_content"
46-
android:layout_height="match_parent"
47-
android:textColor="@android:color/white"
48-
android:gravity="center_vertical"
49-
android:text="@string/sort"
50-
android:textSize="@dimen/sp_18"
51-
android:layout_gravity="center_vertical"
52-
android:paddingEnd="@dimen/dp_15"
53-
android:visibility="gone"
54-
tools:ignore="RtlSymmetry" />
48+
android:id="@+id/mSortTv"
49+
android:layout_width="wrap_content"
50+
android:layout_height="match_parent"
51+
android:layout_gravity="center_vertical"
52+
android:gravity="center_vertical"
53+
android:paddingEnd="@dimen/dp_15"
54+
android:text="@string/sort"
55+
android:textColor="@android:color/white"
56+
android:textSize="@dimen/sp_20"
57+
android:visibility="gone"
58+
tools:ignore="RtlSymmetry" />
5559

5660
</LinearLayout>
5761

5862
<FrameLayout
59-
android:id="@+id/frameLayout"
60-
android:layout_width="match_parent"
61-
android:layout_height="0dp"
62-
android:layout_weight="1"/>
63+
android:id="@+id/frameLayout"
64+
android:layout_width="match_parent"
65+
android:layout_height="0dp"
66+
android:layout_weight="1" />
6367

6468

6569
</LinearLayout>

0 commit comments

Comments
 (0)