From e69139bc246382a901551e5842a8b253bdcf03f0 Mon Sep 17 00:00:00 2001 From: Torsten Grote <t@grobox.de> Date: Mon, 21 Nov 2016 18:32:29 -0200 Subject: [PATCH] Bring back the toolbar shadow --- .../res/layout/activity_conversation.xml | 48 ++++++++++--------- .../res/layout/activity_dev_report.xml | 14 ++++-- briar-android/res/layout/activity_plain.xml | 30 +++++------- .../res/layout/activity_with_loading.xml | 17 ++++--- briar-android/res/layout/splash.xml | 3 +- briar-android/res/values/styles.xml | 4 -- briar-android/res/values/themes.xml | 1 - 7 files changed, 60 insertions(+), 57 deletions(-) diff --git a/briar-android/res/layout/activity_conversation.xml b/briar-android/res/layout/activity_conversation.xml index acf9bd653b..cc05097fde 100644 --- a/briar-android/res/layout/activity_conversation.xml +++ b/briar-android/res/layout/activity_conversation.xml @@ -8,35 +8,37 @@ android:orientation="vertical" tools:context=".android.contact.ConversationActivity"> - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - style="@style/BriarToolbar" + <android.support.design.widget.AppBarLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - app:layout_collapseMode="pin" - app:layout_scrollFlags="scroll|enterAlways" - app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> - <include layout="@layout/contact_avatar_status"/> + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + style="@style/BriarToolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <org.thoughtcrime.securesms.components.emoji.EmojiTextView - android:id="@+id/contactName" - style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse" + <LinearLayout android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_marginLeft="@dimen/margin_medium" - android:layout_marginStart="@dimen/margin_medium" - android:gravity="center" - tools:text="Contact Name"/> + android:layout_height="match_parent"> + + <include layout="@layout/contact_avatar_status"/> + + <org.thoughtcrime.securesms.components.emoji.EmojiTextView + android:id="@+id/contactName" + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:layout_marginStart="@dimen/margin_medium" + android:gravity="center" + tools:text="Contact Name"/> + + </LinearLayout> - </LinearLayout> + </android.support.v7.widget.Toolbar> - </android.support.v7.widget.Toolbar> + </android.support.design.widget.AppBarLayout> <org.briarproject.android.view.BriarRecyclerView android:id="@+id/conversationView" diff --git a/briar-android/res/layout/activity_dev_report.xml b/briar-android/res/layout/activity_dev_report.xml index cdc892c9e4..6670afeffa 100644 --- a/briar-android/res/layout/activity_dev_report.xml +++ b/briar-android/res/layout/activity_dev_report.xml @@ -11,11 +11,17 @@ android:orientation="vertical" tools:context=".android.report.DevReportActivity"> - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - style="@style/BriarToolbar" + <android.support.design.widget.AppBarLayout android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content"> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + style="@style/BriarToolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + + </android.support.design.widget.AppBarLayout> <RelativeLayout android:layout_width="match_parent" diff --git a/briar-android/res/layout/activity_plain.xml b/briar-android/res/layout/activity_plain.xml index 93af4f94bf..4c7bae06e0 100644 --- a/briar-android/res/layout/activity_plain.xml +++ b/briar-android/res/layout/activity_plain.xml @@ -1,30 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - style="@style/BriarToolbar" + <android.support.design.widget.AppBarLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?attr/colorPrimary" - android:minHeight="?attr/actionBarSize" - /> + android:layout_height="wrap_content"> - <FrameLayout - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <FrameLayout - android:id="@+id/content_fragment" + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + style="@style/BriarToolbar" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/window_background"/> + android:layout_height="wrap_content"/> - </FrameLayout> + </android.support.design.widget.AppBarLayout> + + <FrameLayout + android:id="@+id/content_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/window_background"/> </LinearLayout> \ No newline at end of file diff --git a/briar-android/res/layout/activity_with_loading.xml b/briar-android/res/layout/activity_with_loading.xml index 904348306d..2c797c36c4 100644 --- a/briar-android/res/layout/activity_with_loading.xml +++ b/briar-android/res/layout/activity_with_loading.xml @@ -6,14 +6,17 @@ android:layout_height="match_parent" android:orientation="vertical"> - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - style="@style/BriarToolbar" + <android.support.design.widget.AppBarLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?attr/colorPrimary" - android:minHeight="?attr/actionBarSize" - /> + android:layout_height="wrap_content"> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + style="@style/BriarToolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + + </android.support.design.widget.AppBarLayout> <FrameLayout android:layout_width="match_parent" diff --git a/briar-android/res/layout/splash.xml b/briar-android/res/layout/splash.xml index c7b171adb5..da9943399d 100644 --- a/briar-android/res/layout/splash.xml +++ b/briar-android/res/layout/splash.xml @@ -10,6 +10,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" - android:layout_margin="@dimen/margin_xxlarge" /> + android:layout_margin="@dimen/margin_xxlarge" + android:contentDescription="@string/app_name"/> </RelativeLayout> diff --git a/briar-android/res/values/styles.xml b/briar-android/res/values/styles.xml index 0896e6e6b3..cb439b1c58 100644 --- a/briar-android/res/values/styles.xml +++ b/briar-android/res/values/styles.xml @@ -18,10 +18,6 @@ <item name="android:textColor">@color/briar_text_primary_inverse</item> </style> - <style name="BriarActionBar" parent="Base.Widget.AppCompat.Light.ActionBar.Solid"> - <item name="elevation">1dp</item> - </style> - <style name="BriarButton.Default"> <item name="android:textAllCaps">true</item> </style> diff --git a/briar-android/res/values/themes.xml b/briar-android/res/values/themes.xml index 6b2990e15e..1cc3700cd1 100644 --- a/briar-android/res/values/themes.xml +++ b/briar-android/res/values/themes.xml @@ -2,7 +2,6 @@ <resources> <style name="BriarBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar"> - <item name="actionBarStyle">@style/BriarActionBar</item> <item name="colorPrimary">@color/briar_primary</item> <item name="colorPrimaryDark">@color/briar_primary_dark</item> <item name="colorAccent">@color/briar_accent</item> -- GitLab