mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-29 22:41:56 +08:00
Back out "[react-native][PR] Rounded corner rendering fixed on Android N."
Summary: Original PR: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook Github Bot
parent
764dd511d2
commit
bb407fa1ec
@@ -238,7 +238,8 @@ public class ReactViewGroup extends ViewGroup implements
|
||||
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
|
||||
backgroundDrawable.setRadius(borderRadius);
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
|
||||
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
|
||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
final int UPDATED_LAYER_TYPE =
|
||||
backgroundDrawable.hasRoundedBorders()
|
||||
? View.LAYER_TYPE_SOFTWARE
|
||||
@@ -253,8 +254,9 @@ public class ReactViewGroup extends ViewGroup implements
|
||||
public void setBorderRadius(float borderRadius, int position) {
|
||||
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
|
||||
backgroundDrawable.setRadius(borderRadius, position);
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
|
||||
|
||||
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
|
||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
final int UPDATED_LAYER_TYPE =
|
||||
backgroundDrawable.hasRoundedBorders()
|
||||
? View.LAYER_TYPE_SOFTWARE
|
||||
|
||||
Reference in New Issue
Block a user