aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
index e6aa4e3f..bc5d96c0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
@@ -23,6 +23,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
+import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.OrientationEventListener;
@@ -83,6 +84,7 @@ import javax.inject.Named;
import javax.inject.Provider;
import app.futured.hauler.DragDirection;
+import app.futured.hauler.OnDragActivityListener;
import ml.docilealligator.infinityforreddit.CustomFontReceiver;
import ml.docilealligator.infinityforreddit.FetchRedgifsVideoLinks;
import ml.docilealligator.infinityforreddit.FetchStreamableVideo;
@@ -269,10 +271,10 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe
boolean zoomable = mSharedPreferences.getBoolean(SharedPreferencesUtils.PINCH_TO_ZOOM_VIDEO, false);
if (zoomable) {
binding = new ViewVideoActivityBindingAdapter(ActivityViewVideoZoomableBinding.inflate(getLayoutInflater()));
- setContentView(R.layout.activity_view_video_zoomable);
+ setContentView(binding.getRoot());
} else {
binding = new ViewVideoActivityBindingAdapter(ActivityViewVideoBinding.inflate(getLayoutInflater()));
- setContentView(R.layout.activity_view_video);
+ setContentView(binding.getRoot());
}
setVolumeControlStream(AudioManager.STREAM_MUSIC);
@@ -346,6 +348,15 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe
});
}
+
+
+ binding.getRoot().setOnDragActivityListener(new OnDragActivityListener() {
+ @Override
+ public void onDrag(float v, float v1) {
+ Log.i("asdfasdf", "v " + v + " v1 " + v1);
+ }
+ });
+
binding.getRoot().setOnDragDismissedListener(dragDirection -> {
int slide = dragDirection == DragDirection.UP ? R.anim.slide_out_up : R.anim.slide_out_down;
finish();