mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
6fa7eca60b
Update our media send flow to allow users to send multiple images/videos at once. This change includes: - New in-app media picker flow. - Ability to caption images and videos. - Image editing tools are made more prominent in the flow. - Some fixes to the image editing tools.
35 lines
963 B
Java
35 lines
963 B
Java
package org.thoughtcrime.securesms.components;
|
|
|
|
import android.content.Context;
|
|
import android.support.annotation.NonNull;
|
|
import android.support.annotation.Nullable;
|
|
import android.support.v4.view.ViewPager;
|
|
import android.util.AttributeSet;
|
|
import android.view.MotionEvent;
|
|
|
|
import org.thoughtcrime.securesms.components.viewpager.HackyViewPager;
|
|
|
|
/**
|
|
* An implementation of {@link ViewPager} that disables swiping when the view is disabled.
|
|
*/
|
|
public class ControllableViewPager extends HackyViewPager {
|
|
|
|
public ControllableViewPager(@NonNull Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public ControllableViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
@Override
|
|
public boolean onTouchEvent(MotionEvent ev) {
|
|
return isEnabled() && super.onTouchEvent(ev);
|
|
}
|
|
|
|
@Override
|
|
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
|
return isEnabled() && super.onInterceptTouchEvent(ev);
|
|
}
|
|
}
|