Skip to content

Restore the possibility to extend LayoutAnimationController #51479

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import javax.annotation.concurrent.NotThreadSafe
*/
@NotThreadSafe
@LegacyArchitecture
public class LayoutAnimationController {
public open class LayoutAnimationController {
private val layoutCreateAnimation: AbstractLayoutAnimation = LayoutCreateAnimation()
private val layoutUpdateAnimation: AbstractLayoutAnimation = LayoutUpdateAnimation()
private val layoutDeleteAnimation: AbstractLayoutAnimation = LayoutDeleteAnimation()
Expand Down Expand Up @@ -68,7 +68,7 @@ public class LayoutAnimationController {
}
}

public fun reset() {
public open fun reset() {
layoutCreateAnimation.reset()
layoutUpdateAnimation.reset()
layoutDeleteAnimation.reset()
Expand All @@ -83,7 +83,7 @@ public class LayoutAnimationController {
}
}

public fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
public open fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
// if view parent is null, skip animation: view have been clipped, we don't want animation to
// resume when view is re-attached to parent, which is the standard android animation behavior.
// If there's a layout handling animation going on, it should be animated nonetheless since the
Expand All @@ -106,7 +106,7 @@ public class LayoutAnimationController {
* @param width the new width value for the view
* @param height the new height value for the view
*/
public fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
public open fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
assertOnUiThread()

val reactTag = view.id
Expand Down Expand Up @@ -167,7 +167,7 @@ public class LayoutAnimationController {
* @param listener Called once the animation is finished, should be used to completely remove the
* view.
*/
public fun deleteView(view: View, listener: LayoutAnimationListener) {
public open fun deleteView(view: View, listener: LayoutAnimationListener) {
assertOnUiThread()

val animation =
Expand Down
Loading