-
Notifications
You must be signed in to change notification settings - Fork 417
Add setCustomAnimations into Platform Samples #157
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
Conversation
@@ -0,0 +1,46 @@ | |||
/* | |||
* Copyright 2023 The Android Open Source Project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 2024
~ limitations under the License. | ||
--> | ||
|
||
<!--<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor requested changes
samples/user-interface/predictiveback/src/main/res/animator/fade_in.xml
Outdated
Show resolved
Hide resolved
samples/user-interface/predictiveback/src/main/res/animator/fade_out.xml
Show resolved
Hide resolved
samples/user-interface/predictiveback/src/main/res/layout/activity_set_custom_animations.xml
Outdated
Show resolved
Hide resolved
samples/user-interface/predictiveback/src/main/res/layout/activity_set_custom_animations.xml
Outdated
Show resolved
Hide resolved
samples/user-interface/predictiveback/src/main/res/layout/activity_set_custom_animations.xml
Outdated
Show resolved
Hide resolved
samples/user-interface/predictiveback/src/main/res/layout/fragment_set_custom_animations.xml
Outdated
Show resolved
Hide resolved
.../user-interface/predictiveback/src/main/res/layout/fragment_set_custom_animations_second.xml
Outdated
Show resolved
Hide resolved
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this a button and have the user click the button instead of the box. Then, in the second fragment, make the UI a bit different (change the box size and color for example) so the user can see the transition more apparently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Decided the change to a button for Fragment A. I tried to get the button color to be the same as the box color, but somehow it's still turning out to be purple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For the button background, try adding app:backgroundTint="@null" to the Button.
<!-- app:layout_constraintStart_toStartOf="parent"--> | ||
<!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
|
||
<View |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this box different, change the color and the size.
…ze and color of button for more pronounce transition
TRANSITION, | ||
MATERIAL_SHARED_AXIS | ||
MATERIAL_SHARED_AXIS, | ||
SET_CUSTOM_ANIMATIONS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: to make better diff in the future
SET_CUSTOM_ANIMATIONS | |
SET_CUSTOM_ANIMATIONS, |
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For the button background, try adding app:backgroundTint="@null" to the Button.
Adding setCustomAnimations with PB support into Platform Samples