aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-25 11:31:31 -0700
committerAllan Wang <me@allanwang.ca>2017-06-25 11:31:31 -0700
commit2588d7bd473203dbd0a09f6a6cbb0a3f0b5c0c19 (patch)
tree19f70948b124f0620cf4c3c9581fcd0ea4a7d544 /library/src/main/res
parentb51ce53886415bb4a6b320a3a53eee587ec8c288 (diff)
downloadkau-2588d7bd473203dbd0a09f6a6cbb0a3f0b5c0c19.tar.gz
kau-2588d7bd473203dbd0a09f6a6cbb0a3f0b5c0c19.tar.bz2
kau-2588d7bd473203dbd0a09f6a6cbb0a3f0b5c0c19.zip
More annotations
Diffstat (limited to 'library/src/main/res')
-rw-r--r--library/src/main/res/layout/kau_search_item.xml38
-rw-r--r--library/src/main/res/values/dimens_search.xml1
2 files changed, 32 insertions, 7 deletions
diff --git a/library/src/main/res/layout/kau_search_item.xml b/library/src/main/res/layout/kau_search_item.xml
index 20f3ef2..4de4ed6 100644
--- a/library/src/main/res/layout/kau_search_item.xml
+++ b/library/src/main/res/layout/kau_search_item.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/search_item_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/kau_search_item_height"
@@ -12,14 +13,17 @@
<ImageView
android:id="@+id/search_icon"
android:layout_width="@dimen/kau_search_icon"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
android:contentDescription="@string/kau_search"
- android:scaleType="center" />
+ android:scaleType="centerInside"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
<TextView
- android:id="@+id/search_text"
+ android:id="@+id/search_title"
android:layout_width="0dp"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:ellipsize="end"
@@ -28,6 +32,26 @@
android:paddingEnd="@dimen/kau_search_key_line_16"
android:paddingStart="@dimen/kau_search_key_line_8"
android:textIsSelectable="false"
- android:textSize="@dimen/kau_search_text_small" />
+ android:textSize="@dimen/kau_search_text_small"
+ app:layout_constraintStart_toEndOf="@id/search_icon"
+ app:layout_constraintTop_toTopOf="parent" />
-</LinearLayout> \ No newline at end of file
+ <TextView
+ android:id="@+id/search_desc"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_gravity="start|center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="end"
+ android:visibility="gone"
+ android:gravity="start|center_vertical"
+ android:maxLines="1"
+ android:paddingEnd="@dimen/kau_search_key_line_16"
+ android:paddingStart="@dimen/kau_search_key_line_8"
+ android:textIsSelectable="false"
+ android:textSize="@dimen/kau_search_text_micro"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@id/search_icon"
+ app:layout_constraintTop_toBottomOf="@id/search_title" />
+
+</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/library/src/main/res/values/dimens_search.xml b/library/src/main/res/values/dimens_search.xml
index 9d4ea5e..acf79cb 100644
--- a/library/src/main/res/values/dimens_search.xml
+++ b/library/src/main/res/values/dimens_search.xml
@@ -13,6 +13,7 @@
<dimen name="kau_search_item_height">56dp</dimen>
<dimen name="kau_search_icon">56dp</dimen>
<dimen name="kau_search_progress">24dp</dimen>
+ <dimen name="kau_search_text_micro">12sp</dimen>
<dimen name="kau_search_text_small">14sp</dimen>
<dimen name="kau_search_text_medium">16sp</dimen>
<dimen name="kau_search_reveal">24dp</dimen>