diff options
Diffstat (limited to 'org.fox.ttrss/src')
3 files changed, 47 insertions, 9 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 63b12cb6..2fc2fcd8 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -1357,8 +1357,15 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, intent.putExtra("title", article.title); intent.putExtra("coverSrc", article.flavorImageUri); - startActivity(intent); - m_activity.overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); + //startActivity(intent); + //m_activity.overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); + + ActivityOptionsCompat options = + ActivityOptionsCompat.makeSceneTransitionAnimation(m_activity, + transitionView != null ? transitionView : holder.flavorImageView, + "gallery:" + article.flavorImageUri); + + ActivityCompat.startActivity(m_activity, intent, options.toBundle()); } else { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java index 6e4c88a9..284e81e4 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/VideoPlayerActivity.java @@ -2,11 +2,16 @@ package org.fox.ttrss; import android.content.Intent;
import android.content.res.Configuration;
+import android.graphics.Bitmap;
import android.graphics.Rect;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.view.ViewCompat;
+import android.support.v4.view.WindowCompat;
import android.support.v7.widget.Toolbar;
+import android.transition.Explode;
import android.util.Log;
import android.view.ContextMenu;
import android.view.Display;
@@ -22,6 +27,8 @@ import android.widget.MediaController; import android.widget.PopupMenu;
import com.nostra13.universalimageloader.core.ImageLoader;
+import com.nostra13.universalimageloader.core.assist.FailReason;
+import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import java.io.IOException;
@@ -63,8 +70,34 @@ public class VideoPlayerActivity extends CommonActivity { ImageView coverView = (ImageView)findViewById(R.id.video_player_cover);
if (m_coverUri != null) {
+ ActivityCompat.postponeEnterTransition(VideoPlayerActivity.this);
+
+ ViewCompat.setTransitionName(coverView, "gallery:" + m_coverUri);
+
ImageLoader imageLoader = ImageLoader.getInstance();
- imageLoader.displayImage(m_coverUri, coverView);
+ imageLoader.displayImage(m_coverUri, coverView, new ImageLoadingListener() {
+ @Override
+ public void onLoadingStarted(String s, View view) {
+ ActivityCompat.startPostponedEnterTransition(VideoPlayerActivity.this);
+ }
+
+ @Override
+ public void onLoadingFailed(String s, View view, FailReason failReason) {
+ ActivityCompat.startPostponedEnterTransition(VideoPlayerActivity.this);
+ }
+
+ @Override
+ public void onLoadingComplete(String s, View view, Bitmap bitmap) {
+ ActivityCompat.startPostponedEnterTransition(VideoPlayerActivity.this);
+ }
+
+ @Override
+ public void onLoadingCancelled(String s, View view) {
+ ActivityCompat.startPostponedEnterTransition(VideoPlayerActivity.this);
+ }
+ });
+
+
} else {
coverView.setVisibility(View.GONE);
}
@@ -305,14 +338,13 @@ public class VideoPlayerActivity extends CommonActivity { surfaceView.setLayoutParams(lp);
}
- @Override
+ /*@Override
public void onPause() {
super.onPause();
if (isFinishing()) {
- overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
- }
- }
+ }
+ }*/
}
diff --git a/org.fox.ttrss/src/main/res/layout/activity_video_player.xml b/org.fox.ttrss/src/main/res/layout/activity_video_player.xml index 08353c68..6f57714f 100644 --- a/org.fox.ttrss/src/main/res/layout/activity_video_player.xml +++ b/org.fox.ttrss/src/main/res/layout/activity_video_player.xml @@ -14,8 +14,7 @@ android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
- android:id="@+id/video_player"
- android:transitionName="TRANSITION:ARTICLE_VIDEO_PLAYER" />
+ android:id="@+id/video_player" />
<ImageView
android:id="@+id/video_player_cover"
|