Skip to content

Commit bb407fa

Browse files
Jonathan Leefacebook-github-bot
Jonathan Lee
authored andcommittedOct 16, 2018
Back out "[react-native][PR] Rounded corner rendering fixed on Android N."
Summary: Original PR: #21340 The original PR fixed a bug with border radius on Android 7.0, but caused a new bug where no `ReactART` components would render if they were nested within a View with border radius set. Differential Revision: D10409352 fbshipit-source-id: 0b4e36ae9d4c3bc2f4884a43909f8efdeeb41b74
1 parent 764dd51 commit bb407fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

Diff for: ‎ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ public void setBorderRadius(float borderRadius) {
238238
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
239239
backgroundDrawable.setRadius(borderRadius);
240240

241-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
241+
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
242+
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
242243
final int UPDATED_LAYER_TYPE =
243244
backgroundDrawable.hasRoundedBorders()
244245
? View.LAYER_TYPE_SOFTWARE
@@ -253,8 +254,9 @@ public void setBorderRadius(float borderRadius) {
253254
public void setBorderRadius(float borderRadius, int position) {
254255
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
255256
backgroundDrawable.setRadius(borderRadius, position);
256-
257-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
257+
258+
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
259+
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
258260
final int UPDATED_LAYER_TYPE =
259261
backgroundDrawable.hasRoundedBorders()
260262
? View.LAYER_TYPE_SOFTWARE

0 commit comments

Comments
 (0)
Please sign in to comment.