Skip to content

Commit f67078d

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Deprecate all LegacyArchitecture classes on LayoutAnimation package (#53101)
Summary: Pull Request resolved: #53101 Deprecate all LegacyArchitecture classes on LayoutAnimation package changelog: [Android][Changed] Deprecate LegacyArchitecture classes from LayoutAnimation package Reviewed By: alanleedev Differential Revision: D79658935 fbshipit-source-id: 34ab2f674868dbee459f2018e82a7d50d0d7333a
1 parent 3b185e4 commit f67078d

17 files changed

Lines changed: 73 additions & 0 deletions

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import android.view.View
@@ -27,6 +29,9 @@ import com.facebook.react.uimanager.IllegalViewOperationException
2729
* order to animate layout when a valid configuration has been supplied by the application.
2830
*/
2931
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
32+
@Deprecated(
33+
message = "This class is part of Legacy Architecture and will be removed in a future release",
34+
level = DeprecationLevel.WARNING)
3035
internal abstract class AbstractLayoutAnimation {
3136
var interpolator: Interpolator? = null
3237
var delayMs: Int = 0

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
@@ -15,6 +17,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
1517
* creation.
1618
*/
1719
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
20+
@Deprecated(
21+
message = "This class is part of Legacy Architecture and will be removed in a future release",
22+
level = DeprecationLevel.WARNING)
1823
internal enum class AnimatedPropertyType {
1924
OPACITY,
2025
SCALE_X,

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/BaseLayoutAnimation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import android.view.View
@@ -17,6 +19,9 @@ import com.facebook.react.uimanager.IllegalViewOperationException
1719

1820
/** Class responsible for default layout animation, i.e animation of view creation and deletion. */
1921
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
22+
@Deprecated(
23+
message = "This class is part of Legacy Architecture and will be removed in a future release",
24+
level = DeprecationLevel.WARNING)
2025
internal abstract class BaseLayoutAnimation : AbstractLayoutAnimation() {
2126
abstract fun isReverse(): Boolean
2227

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
@@ -14,6 +16,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
1416
* Enum representing the different interpolators that can be used in layout animation configuration.
1517
*/
1618
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
19+
@Deprecated(
20+
message = "This class is part of Legacy Architecture and will be removed in a future release",
21+
level = DeprecationLevel.WARNING)
1722
internal enum class InterpolatorType {
1823
LINEAR,
1924
EASE_IN,

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import android.util.SparseArray
@@ -29,6 +31,9 @@ import javax.annotation.concurrent.NotThreadSafe
2931
*/
3032
@NotThreadSafe
3133
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
34+
@Deprecated(
35+
message = "This class is part of Legacy Architecture and will be removed in a future release",
36+
level = DeprecationLevel.WARNING)
3237
public open class LayoutAnimationController {
3338
private val layoutCreateAnimation: AbstractLayoutAnimation = LayoutCreateAnimation()
3439
private val layoutUpdateAnimation: AbstractLayoutAnimation = LayoutUpdateAnimation()

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
1113
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
1214

1315
/** Listener invoked when a layout animation has completed. */
1416
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
17+
@Deprecated(
18+
message = "This class is part of Legacy Architecture and will be removed in a future release",
19+
level = DeprecationLevel.WARNING)
1520
public fun interface LayoutAnimationListener {
1621
public fun onAnimationEnd()
1722
}

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
@@ -15,6 +17,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
1517
* Enum representing the different animation type that can be specified in layout animation config.
1618
*/
1719
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
20+
@Deprecated(
21+
message = "This class is part of Legacy Architecture and will be removed in a future release",
22+
level = DeprecationLevel.WARNING)
1823
internal enum class LayoutAnimationType {
1924
CREATE,
2025
UPDATE,

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
@@ -16,6 +18,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
1618
* config was supplied for the layout animation of DELETE type.
1719
*/
1820
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
21+
@Deprecated(
22+
message = "This class is part of Legacy Architecture and will be removed in a future release",
23+
level = DeprecationLevel.WARNING)
1924
internal class LayoutDeleteAnimation : BaseLayoutAnimation() {
2025

2126
override fun isReverse(): Boolean = true

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
@file:Suppress("DEPRECATION")
9+
810
package com.facebook.react.uimanager.layoutanimation
911

1012
import com.facebook.react.common.annotations.internal.LegacyArchitecture
1113
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
1214

1315
/** Interface for an animation type that takes care of updating the view layout. */
1416
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
17+
@Deprecated(
18+
message = "This class is part of Legacy Architecture and will be removed in a future release",
19+
level = DeprecationLevel.WARNING)
1520
internal interface LayoutHandlingAnimation {
1621
/**
1722
* Notifies the animation of a layout update in case one occurs during the animation. This avoids

0 commit comments

Comments
 (0)