X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/c20041d157baebede8e47a5f6837ba7dd51204f7..db40d1ad68f11f1429c2fd544410b38501ecffd0:/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java diff --git a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 89f002ff..d87b82cb 100644 --- a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -28,6 +28,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; import android.content.res.Configuration; +import android.content.res.Resources; import android.media.MediaPlayer; import android.media.MediaPlayer.OnCompletionListener; import android.media.MediaPlayer.OnErrorListener; @@ -340,7 +341,14 @@ public class PreviewMediaFragment extends FileFragment implements mContainerActivity.getFileOperationsHelper().syncFile(getFile()); return true; } - + case R.id.action_favorite_file:{ + mContainerActivity.getFileOperationsHelper().toggleFavorite(getFile(), true); + return true; + } + case R.id.action_unfavorite_file:{ + mContainerActivity.getFileOperationsHelper().toggleFavorite(getFile(), false); + return true; + } default: return false; } @@ -509,7 +517,10 @@ public class PreviewMediaFragment extends FileFragment implements @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN && v == mVideoPreview) { - startFullScreenVideo(); + // added a margin on the left to avoid interfering with gesture to open navigation drawer + if (event.getX() / Resources.getSystem().getDisplayMetrics().density > 24.0) { + startFullScreenVideo(); + } return true; } return false;