summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-09-06 15:44:17 -0700
committerTony Wickham <twickham@google.com>2018-09-11 15:35:47 -0700
commit08c7cd562533abfddd678ed9a1c3c04e3e6b0d9d (patch)
treec4d5b785a6b360277114f68d756020621e0bcadb /res/layout
parent447036d0d70ec90d05ad5ab25499fabefda6245b (diff)
downloadandroid_packages_apps_Trebuchet-08c7cd562533abfddd678ed9a1c3c04e3e6b0d9d.tar.gz
android_packages_apps_Trebuchet-08c7cd562533abfddd678ed9a1c3c04e3e6b0d9d.tar.bz2
android_packages_apps_Trebuchet-08c7cd562533abfddd678ed9a1c3c04e3e6b0d9d.zip
Update undo snackbar visuals
- Use accent color for action - Update font-family to use TextTitle style - Reduce elevation to 3dp - Inset snackbar left/right margins more, unless we need to increase the width to fit the text - For largest display/font size, fallback to 2 lines and smaller font if necessary to not cut off the label - Remove top/bottom padding on action (b/114084048) - Allow up to 20 char for the action (b/114317987) Change-Id: I833c102aaac3ba3db2283997c142926c3830336d
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/snackbar.xml16
1 files changed, 11 insertions, 5 deletions
diff --git a/res/layout/snackbar.xml b/res/layout/snackbar.xml
index 419fb8220..bca330842 100644
--- a/res/layout/snackbar.xml
+++ b/res/layout/snackbar.xml
@@ -25,17 +25,23 @@
android:gravity="center_vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp"
- android:textSize="14sp"
- android:textColor="?android:attr/textColorPrimary"/>
+ android:lines="1"
+ android:ellipsize="end"
+ android:textSize="@dimen/snackbar_max_text_size"
+ android:textColor="?android:attr/textColorPrimary"
+ android:theme="@style/TextTitle"/>
<TextView
android:id="@+id/action"
android:layout_height="@dimen/snackbar_content_height"
android:layout_width="wrap_content"
android:layout_weight="0"
android:gravity="center"
- android:padding="8dp"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
android:background="?android:attr/selectableItemBackground"
android:textStyle="bold"
- android:textColor="?android:attr/textColorPrimary"
- android:textAllCaps="true"/>
+ android:textSize="@dimen/snackbar_max_text_size"
+ android:textColor="?android:attr/colorAccent"
+ android:theme="@style/TextTitle"
+ android:capitalize="sentences"/>
</merge> \ No newline at end of file