Closed andanicalik closed 5 years ago
Hey @andanicalik Can you show me the transactionOptions that you're building, how you're sending them in, and where you're trying to grab them?
Thanks
Hi. I added my code. Thank you for your interest @ncapdevi .
FragNavTransactionOptions options = FragNavTransactionOptions.newBuilder() .addSharedElement(new Pair<View, String>(viewHolder.imageViewExerciseCategory, "exerciseCategory")).transition(R.transition.exercise_category).build();
ExerciseSubCategoryFragment fragment = ExerciseSubCategoryFragment.newInstance(categoryId); mFragmentNavigation.pushFragment(fragment, options);
-> exercise_category.xml
`<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" android:transitionOrdering="together">
<changeTransform />
<changeImageTransform />
`
Hi @andanicalik, have you had any luck with this?
What we really need is a PR for the sample app to have shared elements. If we can get that, it's easier to test.
I have the same issue and can't get it to work. Could it be because this library uses add(...)
instead of replace(...)
for the fragment transaction?
@Thomas-Vos Not entirely sure on that. I was under the impression that add(...)
would work, but it's possible that it doesn't. What I really need is to have a solid sample app to test this out.
Can you add example about use shared element ? I add shared element and transition to FragNavTransactionOptions but animation doesn't shown.