android-transitions

Fragment shared element transitions don't work with ViewPager

社会主义新天地 提交于 2019-11-28 16:38:47
My app contains a view which consists of a ViewPager consisting of a handful of fragments. When you click on an item in one of these fragments, the expected behavior is for the shared element (in this case an image) to transition to the fragment which displays more information about the clicked content. Here is a very simple video of what it should look like: https://dl.dropboxusercontent.com/u/97787025/device-2015-06-03-114842.mp4 This is just using a Fragment->Fragment transition. The problem arises when you place the starting fragment inside a ViewPager. I suspect this is because the

Why the XML specified transition isn't executed? (or why its specified duration isn't taken account?)

帅比萌擦擦* 提交于 2019-11-28 11:52:16
问题 I followed this documentation: https://developer.android.com/training/transitions/start-activity#java . First, I will show you my implementation. You will find my question at the end of this post. Thus, I modified 4 files: fade.xml, which defines the duration of the fade in transition. <?xml version="1.0" encoding="utf-8"?> <transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <fade android:fadingMode="fade_in" android:duration="3000" /> </transitionSet> values/styles.xml

Make activity animate from top to bottom

霸气de小男生 提交于 2019-11-28 03:35:35
I am writing an Android app where I want the activity to appear by animating in from the bottom of the screen to the top. I am able to do this with code from here: How to translate the activity from top to bottom and viceversa? However, I am not able to do the vice-versa animation wherein the Activity would disappear by sliding from the top to the bottom of the screen. I used the code in the above link; the activity appears by sliding up, but when disappearing, it fades out, instead of sliding to the bottom. I even tried putting the code in onCreate() : @Override protected void onCreate(Bundle

Shared Element Transitions Between Views (not Activities or Fragments)

China☆狼群 提交于 2019-11-28 02:59:39
Let's say I'm using a view-based approach to develop an Android application like for example described in the following article: http://corner.squareup.com/2014/10/advocating-against-android-fragments.html So now I have two full screen views. One is visible and contains a grid of images. The other is hidden and is a detail view of the to-be-clicked image. Without transitions on clicking an image in the grid the grid view will be hidden and the detail view will be shown. Now what if I want to have something akin to a shared element transition between the small image in the grid view and the

Scene transition with hero elements throws Layer exceeds max. dimensions supported by the GPU

杀马特。学长 韩版系。学妹 提交于 2019-11-27 18:12:06
I am trying to do a hero transition in Android 5.0 between an image in a ListView to a details page. But for about 50% of my images Android crashes with the exception below. My images are 600x400 but I tried changing them to 200x100 but got the same error. When it works, it looks great but I cannot see the difference between the various images. Really unsure why it claims the layer is too big, anybody got a clue? private void handleNewsItemClicked(AdapterView<?> arg0, View viewClicked, int arg2) { TopNewsItem item = ((TopNewsItem)arg0.getAdapter().getItem(arg2)); Intent intent = new Intent

How to animate floating action button using android activity transition?

删除回忆录丶 提交于 2019-11-27 17:01:43
I am planning to implement something like this in one of my project but the concept for the following is unclear to me, there's no such tutorial available either, moreover you don't get to see this very often. Here is how it looks like Click here to go to source From all the references what i have understood is they have used two types of transition here one to move the button upto some extant and another to explode the button. So i did some digging and came across with these two library in github i think with these two we can achieve the following animation here are the links Material

How to give top to bottom animation in Android?

旧城冷巷雨未停 提交于 2019-11-27 13:48:59
问题 I am able to give bottom to top animation when I go to next activity but now when I pressed back I am using same code for giving animation from top to bottom animation but it always goes to bottom to top so my question is how to give animation from top to bottom when i pressed back button on android device? Please find my code below. I use it during transitioning from one Activity to another using an Intent . overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up ); and xml is:

Shared element transition : activity into fragment nested in another activity

对着背影说爱祢 提交于 2019-11-27 10:11:18
问题 i am trying to add shared element transition into my app. Scenario is that user clicks on image thumbnail which than opens another activity with full screen image view. This works fine if shared view is hosted directly within layout of target activity. Works smoothy for enter/exit animation. But when i'am trying to achieve similar effect within fragment which is nested in target activity this approach doesn't work . Funny thing is that enter animation is not showed, but exit animation is

Fragment shared element transitions don't work with ViewPager

社会主义新天地 提交于 2019-11-27 09:50:08
问题 My app contains a view which consists of a ViewPager consisting of a handful of fragments. When you click on an item in one of these fragments, the expected behavior is for the shared element (in this case an image) to transition to the fragment which displays more information about the clicked content. Here is a very simple video of what it should look like: https://dl.dropboxusercontent.com/u/97787025/device-2015-06-03-114842.mp4 This is just using a Fragment->Fragment transition. The

Shared Element Transitions Between Views (not Activities or Fragments)

心已入冬 提交于 2019-11-26 23:53:47
问题 Let's say I'm using a view-based approach to develop an Android application like for example described in the following article: http://corner.squareup.com/2014/10/advocating-against-android-fragments.html So now I have two full screen views. One is visible and contains a grid of images. The other is hidden and is a detail view of the to-be-clicked image. Without transitions on clicking an image in the grid the grid view will be hidden and the detail view will be shown. Now what if I want to