diff --git a/res/layout/conversation_activity.xml b/res/layout/conversation_activity.xml
index 4672c46636..7ee9106ffc 100644
--- a/res/layout/conversation_activity.xml
+++ b/res/layout/conversation_activity.xml
@@ -1,108 +1,130 @@
-
-
-
+ android:layout_height="?attr/actionBarSize"
+ android:theme="@style/TextSecure.LightActionBar"
+ app:contentInsetStartWithNavigation="0dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:navigationIcon="?homeAsUpIndicator"
+ tools:background="#ff007f00">
-
+
-
+
-
+
-
-
-
-
-
+ android:clipToPadding="false"
+ android:gravity="bottom"
+ android:orientation="vertical"
+ android:paddingTop="?attr/actionBarSize">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
+
+
diff --git a/res/layout/conversation_title_view.xml b/res/layout/conversation_title_view.xml
index f16882db49..b4abaf761d 100644
--- a/res/layout/conversation_title_view.xml
+++ b/res/layout/conversation_title_view.xml
@@ -2,30 +2,19 @@
-
-
handleConversationSettings());
titleView.setOnLongClickListener(v -> handleDisplayQuickContact());
- titleView.setOnBackClickedListener(view -> super.onBackPressed());
unblockButton.setOnClickListener(v -> handleUnblock());
makeDefaultSmsButton.setOnClickListener(v -> handleMakeDefaultSms());
registerButton.setOnClickListener(v -> handleRegisterForSignal());
@@ -1546,12 +1541,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
protected void initializeActionBar() {
+ Toolbar toolbar = findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar == null) throw new AssertionError();
- supportActionBar.setDisplayHomeAsUpEnabled(false);
- supportActionBar.setCustomView(R.layout.conversation_title_view);
- supportActionBar.setDisplayShowCustomEnabled(true);
+ supportActionBar.setDisplayHomeAsUpEnabled(true);
supportActionBar.setDisplayShowTitleEnabled(false);
}
diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java
index 2950b97d09..37458f67f6 100644
--- a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java
+++ b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java
@@ -27,7 +27,6 @@ public class ConversationTitleView extends RelativeLayout {
private static final String TAG = ConversationTitleView.class.getSimpleName();
private View content;
- private ImageView back;
private AvatarImageView avatar;
private TextView title;
private TextView subtitle;
@@ -47,7 +46,6 @@ public class ConversationTitleView extends RelativeLayout {
public void onFinishInflate() {
super.onFinishInflate();
- this.back = ViewUtil.findById(this, R.id.up_button);
this.content = ViewUtil.findById(this, R.id.content);
this.title = ViewUtil.findById(this, R.id.title);
this.subtitle = ViewUtil.findById(this, R.id.subtitle);
@@ -92,10 +90,6 @@ public class ConversationTitleView extends RelativeLayout {
this.avatar.setOnLongClickListener(listener);
}
- public void setOnBackClickedListener(@Nullable OnClickListener listener) {
- this.back.setOnClickListener(listener);
- }
-
private void setComposeTitle() {
this.title.setText(R.string.ConversationActivity_compose_message);
this.subtitle.setText(null);
diff --git a/src/org/thoughtcrime/securesms/util/ThemeUtil.java b/src/org/thoughtcrime/securesms/util/ThemeUtil.java
index 4fbda71cfe..719a93b494 100644
--- a/src/org/thoughtcrime/securesms/util/ThemeUtil.java
+++ b/src/org/thoughtcrime/securesms/util/ThemeUtil.java
@@ -38,9 +38,12 @@ public class ThemeUtil {
TypedValue outValue = new TypedValue();
if (context.getTheme().resolveAttribute(attribute, outValue, true)) {
- return outValue.coerceToString().toString();
- } else {
- return defaultValue;
+ CharSequence charSequence = outValue.coerceToString();
+ if (charSequence != null) {
+ return charSequence.toString();
+ }
}
+
+ return defaultValue;
}
}