ReactTextView extends AppCompatTextView (#23321)
Summary: Google recommends to use AppCompat widgets, and this PR changes ReactTextView to extend AppCompatTextView. [Android] [Changed] - ReactTextView extends AppCompatTextView Pull Request resolved: https://github.com/facebook/react-native/pull/23321 Differential Revision: D13986149 Pulled By: cpojer fbshipit-source-id: 878849fff12dc5478bb0d0952b2c22695391e81a
This commit is contained in:
parent
56fc630368
commit
52e51368eb
|
@ -9,6 +9,8 @@ rn_android_library(
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
YOGA_TARGET,
|
YOGA_TARGET,
|
||||||
|
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||||
|
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||||
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
|
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
|
||||||
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
|
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
|
||||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||||
|
|
|
@ -10,13 +10,13 @@ package com.facebook.react.views.text;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.support.v7.widget.AppCompatTextView;
|
||||||
import android.text.Layout;
|
import android.text.Layout;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
|
||||||
import com.facebook.common.logging.FLog;
|
import com.facebook.common.logging.FLog;
|
||||||
import com.facebook.react.common.ReactConstants;
|
import com.facebook.react.common.ReactConstants;
|
||||||
import com.facebook.react.uimanager.ReactCompoundView;
|
import com.facebook.react.uimanager.ReactCompoundView;
|
||||||
|
@ -24,7 +24,7 @@ import com.facebook.react.uimanager.ViewDefaults;
|
||||||
import com.facebook.react.views.view.ReactViewBackgroundManager;
|
import com.facebook.react.views.view.ReactViewBackgroundManager;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class ReactTextView extends TextView implements ReactCompoundView {
|
public class ReactTextView extends AppCompatTextView implements ReactCompoundView {
|
||||||
|
|
||||||
private static final ViewGroup.LayoutParams EMPTY_LAYOUT_PARAMS =
|
private static final ViewGroup.LayoutParams EMPTY_LAYOUT_PARAMS =
|
||||||
new ViewGroup.LayoutParams(0, 0);
|
new ViewGroup.LayoutParams(0, 0);
|
||||||
|
|
Loading…
Reference in New Issue