material design - Android shared element transition on ImageView scale is wrong -


i have tried many different variations , cannot return transition work properly.

when exit activity b image transitions activity scaled until disappears after disappearing shows should.

i have tried different variations of following , others in group

activity coming click listener in recyclerview.

intent intent = new intent(getactivity(), applyactivity.class);             activityoptionscompat transitionactivityoptions;             transitionactivityoptions = activityoptionscompat.makescenetransitionanimation(getactivity(), imageview, getstring(r.string.transition_image_details));             intent.putextra(applyactivity.extra_name, selected_launcher);             intent.putextra(applyactivity.extra_installed, mlaunchers.get(position).getinstalled());              getactivity().startactivity(intent, transitionactivityoptions.tobundle()); 

activity layout

<imageview android:id="@+id/launcher_icon" android:transitionname="@string/transition_image_details" android:layout_width="72dp" android:layout_height="72dp" android:layout_centerhorizontal="true" android:padding="@dimen/small_padding" android:layout_alignparenttop="true" /> 

activity b

 transition transition = transitioninflater.from(this).inflatetransition(r.transition.change_image_transform);          getwindow().setsharedelementreturntransition(transition);         getwindow().setsharedelemententertransition(transition);         getwindow().setsharedelementexittransition(transition); 

i have tried following true/false getwindow().setsharedelementsuseoverlay(true);

activity b layout (within appbarlayout/collapsingtoolbarlayout)

<imageview    android:id="@+id/backdrop"    android:transitionname="@string/transition_image_details"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:paddingbottom="80dp"    android:paddingtop="30dp"    app:layout_collapsemode="parallax"    app:layout_collapseparallaxmultiplier="0.7" /> 

change_image_transform.xml

<?xml version="1.0" encoding="utf-8"?> <transitionset xmlns:android="http://schemas.android.com/apk/res/android"> <changetransform  /> <changeimagetransform /> </transitionset> 

i have tried setting transition in values-v21/styles.xml no luck.

i have tried setting position recyclerview transition name no luck either.

here video of issue. slowed down transition seen better

https://www.dropbox.com/s/gzli11ae3ebz95f/2016_04_19_20_33_29.mp4?dl=0

make sure 2 images share same scaletype.

refer post more info: android glide library not working shared element transitions


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -