-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unique transitionNames are required #10
Comments
I had the same problem in my own app first time I tried that, the problem was because I put the transitionName and the click listener in two different elements views in XML, you have to make sure to give a unique The right way: <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:layout_width="130dp"
android:layout_height="match_parent"
android:transitionName="@{@string/post_card_transition_name(post.id)}"
android:onClick="@{(view) -> clickListener.onClick(view, post)}"
... and my string is: The wrong way: <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="@{(view) -> clickListener.onClick(view, post)}">
<androidx.cardview.widget.CardView
android:layout_width="130dp"
android:layout_height="match_parent"
android:transitionName="@{@string/post_card_transition_name(post.id)}"
... In the second case, you are sending constraintLayout as a view that has no transitionName to it So when the message says See if your problem seems like that, the transition effect is so awesome, I will definitely always use that from now on |
In Section 4 at this point in the CodeLab:
The app crashes with this IllegalArgumentException:
The text was updated successfully, but these errors were encountered: