mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 12:48:35 +00:00
Remove tap-to-dismiss from view-once.
This commit is contained in:
parent
c346f32762
commit
5e9c4e8fa3
@ -71,18 +71,6 @@ public class ViewOnceMessageActivity extends PassphraseRequiredActionBarActivity
|
|||||||
this.closeButton = findViewById(R.id.view_once_close_button);
|
this.closeButton = findViewById(R.id.view_once_close_button);
|
||||||
this.uri = getIntent().getParcelableExtra(KEY_URI);
|
this.uri = getIntent().getParcelableExtra(KEY_URI);
|
||||||
|
|
||||||
ViewOnceGestureListener imageListener = new ViewOnceGestureListener(image);
|
|
||||||
GestureDetector imageDetector = new GestureDetector(this, imageListener);
|
|
||||||
|
|
||||||
ViewOnceGestureListener videoListener = new ViewOnceGestureListener(video);
|
|
||||||
GestureDetector videoDetector = new GestureDetector(this, videoListener);
|
|
||||||
|
|
||||||
image.setOnTouchListener((view, event) -> imageDetector.onTouchEvent(event));
|
|
||||||
image.setOnClickListener(v -> finish());
|
|
||||||
|
|
||||||
video.setOnTouchListener((view, event) -> videoDetector.onTouchEvent(event));
|
|
||||||
video.setOnClickListener(v -> finish());
|
|
||||||
|
|
||||||
closeButton.setOnClickListener(v -> finish());
|
closeButton.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
initViewModel(getIntent().getLongExtra(KEY_MESSAGE_ID, -1), uri);
|
initViewModel(getIntent().getLongExtra(KEY_MESSAGE_ID, -1), uri);
|
||||||
|
@ -18,15 +18,25 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- Need this wrapper layout to get the ripple to show correctly. https://issuetracker.google.com/issues/111819099 -->
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/transparent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/view_once_close_button"
|
android:id="@+id/view_once_close_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="19dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginStart="19dp"
|
android:layout_marginStart="15dp"
|
||||||
|
android:padding="4dp"
|
||||||
android:tint="@color/core_white"
|
android:tint="@color/core_white"
|
||||||
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
app:srcCompat="@drawable/ic_x"/>
|
app:srcCompat="@drawable/ic_x"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/view_once_duration"
|
android:id="@+id/view_once_duration"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user