aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/res/layout/kau_search_view.xml
blob: d927c68fa1faa741a030ed7bc3740a016879012f (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <View
        android:id="@+id/search_shadow"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/kau_search_full_shadow"
        android:visibility="gone" />

    <android.support.v7.widget.CardView
        android:id="@+id/search_cardview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/kau_search_base_margin"
        android:layout_marginStart="@dimen/kau_search_base_margin"
        app:cardCornerRadius="@dimen/kau_search_base_corners">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/kau_search_height"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:gravity="start|center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/search_nav"
                    android:layout_width="@dimen/kau_search_icon"
                    android:layout_height="match_parent"
                    android:background="?android:attr/selectableItemBackgroundBorderless"
                    android:clickable="true"
                    android:contentDescription="@string/kau_search"
                    android:focusable="true"
                    android:scaleType="centerInside" />

                <android.support.v7.widget.AppCompatEditText
                    android:id="@+id/search_edit_text"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_gravity="start|center_vertical"
                    android:layout_weight="1"
                    android:background="@android:color/transparent"
                    android:ellipsize="end"
                    android:ems="10"
                    android:gravity="start|center_vertical"
                    android:imeOptions="actionSearch|flagNoExtractUi"
                    android:inputType="textNoSuggestions"
                    android:maxLines="1"
                    android:paddingEnd="@dimen/kau_search_key_line_16"
                    android:paddingStart="@dimen/kau_search_key_line_8"
                    android:privateImeOptions="nm"
                    android:textSize="@dimen/kau_search_text_medium"
                    android:windowSoftInputMode="stateAlwaysHidden" />

                <ProgressBar
                    android:id="@+id/search_progress"
                    style="?android:attr/indeterminateProgressStyle"
                    android:layout_width="@dimen/kau_search_progress"
                    android:layout_height="match_parent"
                    android:visibility="gone" />

                <ImageView
                    android:id="@+id/search_extra"
                    android:layout_width="48dp"
                    android:layout_height="match_parent"
                    android:background="?android:attr/selectableItemBackgroundBorderless"
                    android:clickable="true"
                    android:contentDescription="@string/kau_search"
                    android:focusable="true"
                    android:scaleType="center"
                    android:visibility="gone" />

                <ImageView
                    android:id="@+id/search_clear"
                    android:layout_width="48dp"
                    android:layout_height="match_parent"
                    android:background="?android:attr/selectableItemBackgroundBorderless"
                    android:clickable="true"
                    android:contentDescription="@string/kau_search"
                    android:focusable="true"
                    android:scaleType="center" />

            </LinearLayout>

            <View
                android:id="@+id/search_divider"
                android:layout_width="match_parent"
                android:layout_height="@dimen/kau_search_divider"
                android:background="?android:attr/listDivider" />

            <android.support.v7.widget.RecyclerView
                android:id="@+id/search_recycler"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:overScrollMode="never" />

        </LinearLayout>

    </android.support.v7.widget.CardView>

</merge>