Skip to content

Commit 51673e4

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Breaking: Remove ReactViewBackgroundManager and ReactViewBackgroundDrawable (facebook#46166)
Summary: Pull Request resolved: facebook#46166 ## This Diff This removes some of the legacy utilties used for background manipulation, no longer used anywhere (and very rarely used externally from some previous tests). These conflict with BackgroundStyleApplicator, which should be used instead. ## This Stack This removes the non-Style-applicator background management paths of the different native components. There have been multiple conflicting changes, and bugs added bc harder to reason about, which motivates making this change as soon as possible. This also lets us formalize guarantees that BaseViewManager may safely manipulate background styling of all built in native components. There is one still known issue, where BackgroundStyleApplicator does not propagate I18nManager derived layout direction to borders (compared to Android derived root direction). This is mostly an issue for apps that with LTR and RTL context, or force a layout direction, which I would guess is relatively rare, so my plan is to forward fix this later this by enabling set_android_layout_direction which will solve that problem mopre generically. Changelog: [Android][Breaking] - Remove ReactViewBackgroundManager and ReactViewBackgroundDrawable Reviewed By: sammy-SC Differential Revision: D61658084 fbshipit-source-id: 611f6d78fa4859574c063e9f0395c3dadc1588cc
1 parent 0fa7e01 commit 51673e4

File tree

3 files changed

+0
-175
lines changed

3 files changed

+0
-175
lines changed

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8315,10 +8315,6 @@ public class com/facebook/react/views/view/ReactDrawableHelper {
83158315
public static fun createDrawableFromJSDescription (Landroid/content/Context;Lcom/facebook/react/bridge/ReadableMap;)Landroid/graphics/drawable/Drawable;
83168316
}
83178317

8318-
public class com/facebook/react/views/view/ReactViewBackgroundDrawable : com/facebook/react/uimanager/drawable/CSSBackgroundDrawable {
8319-
public fun <init> (Landroid/content/Context;)V
8320-
}
8321-
83228318
public class com/facebook/react/views/view/ReactViewGroup : android/view/ViewGroup, com/facebook/react/touch/ReactHitSlopView, com/facebook/react/touch/ReactInterceptingViewGroup, com/facebook/react/uimanager/ReactClippingViewGroup, com/facebook/react/uimanager/ReactOverflowViewWithInset, com/facebook/react/uimanager/ReactPointerEventsView, com/facebook/react/uimanager/ReactZIndexedViewGroup {
83238319
public fun <init> (Landroid/content/Context;)V
83248320
public fun addView (Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundManager.java

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)