mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Back button for conversation activity.
This commit is contained in:
parent
037d10a7db
commit
3deb9602d1
15
res/drawable/conversation_home_touch_highlight.xml
Normal file
15
res/drawable/conversation_home_touch_highlight.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?attr/colorControlHighlight">
|
||||
<!-- Add half of the medium_profile_picture_size padding on the right to better work with the group icons. -->
|
||||
<item
|
||||
android:id="@android:id/mask"
|
||||
android:right="24dp">
|
||||
<shape>
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/medium_profile_picture_size"
|
||||
android:topLeftRadius="@dimen/medium_profile_picture_size" />
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
10
res/drawable/ic_baseline_arrow_back_compact_24.xml
Normal file
10
res/drawable/ic_baseline_arrow_back_compact_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11.67,3.87L9.9,2.1 0,12l9.9,9.9 1.77,-1.77L3.54,12z"/>
|
||||
</vector>
|
@ -11,19 +11,47 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:clipChildren="false"
|
||||
android:contentInsetLeft="24dp"
|
||||
android:contentInsetStart="24dp"
|
||||
app:contentInsetLeft="24dp"
|
||||
app:contentInsetRight="20dp">
|
||||
app:contentInsetStart="24dp"
|
||||
android:contentInsetRight="20dp"
|
||||
android:contentInsetEnd="20dp"
|
||||
app:contentInsetRight="20dp"
|
||||
app:contentInsetEnd="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:clipChildren="false">
|
||||
|
||||
<org.thoughtcrime.securesms.loki.views.ProfilePictureView
|
||||
android:id="@+id/profilePictureView"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size" />
|
||||
<LinearLayout
|
||||
android:id="@+id/homeButtonContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/conversation_home_touch_highlight"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginLeft="-24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/ic_baseline_arrow_back_compact_24"
|
||||
android:layout_marginRight="-2dp"
|
||||
android:layout_marginLeft="8dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.loki.views.ProfilePictureView
|
||||
android:id="@+id/profilePictureView"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -323,6 +323,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
private ProgressBar messageStatusProgressBar;
|
||||
private ImageView muteIndicatorImageView;
|
||||
private TextView subtitleTextView;
|
||||
private View homeButtonContainer;
|
||||
|
||||
private AttachmentTypeSelector attachmentTypeSelector;
|
||||
private AttachmentManager attachmentManager;
|
||||
@ -1690,6 +1691,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
messageStatusProgressBar = ViewUtil.findById(this, R.id.messageStatusProgressBar);
|
||||
muteIndicatorImageView = ViewUtil.findById(this, R.id.muteIndicatorImageView);
|
||||
subtitleTextView = ViewUtil.findById(this, R.id.subtitleTextView);
|
||||
homeButtonContainer = ViewUtil.findById(this, R.id.homeButtonContainer);
|
||||
|
||||
ImageButton quickCameraToggle = ViewUtil.findById(this, R.id.quick_camera_toggle);
|
||||
ImageButton inlineAttachmentButton = ViewUtil.findById(this, R.id.inline_attachment_button);
|
||||
@ -1744,6 +1746,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
searchNav.setEventListener(this);
|
||||
|
||||
inlineAttachmentButton.setOnClickListener(v -> handleAddAttachment());
|
||||
|
||||
homeButtonContainer.setOnClickListener(v -> onSupportNavigateUp());
|
||||
}
|
||||
|
||||
protected void initializeActionBar() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user