Skip to content

Commit aaa2765

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
ReactEditText extends AppCompatEditText (#27039)
Summary: Google recommends to extend AppCompat widgets, and Android Studio suggests the change. This PR changes ReactEditText to extend AppCompatEditText. ## Changelog [Android] [Changed] - ReactEditText extends AppCompatEditText Pull Request resolved: #27039 Test Plan: CI is green Reviewed By: mdvacca Differential Revision: D18196901 Pulled By: hramos fbshipit-source-id: 1484ae3da1be5776d0431dab3d4bb7ddbe5b8b7c
1 parent f6edecc commit aaa2765

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK

+3-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ rn_android_library(
44
name = "textinput",
55
srcs = glob(["*.java"]),
66
is_androidx = True,
7-
provided_deps = [
8-
react_native_dep("third-party/android/androidx:annotation"),
9-
react_native_dep("third-party/android/androidx:core"),
10-
react_native_dep("third-party/android/androidx:fragment"),
11-
react_native_dep("third-party/android/androidx:legacy-support-core-ui"),
12-
react_native_dep("third-party/android/androidx:legacy-support-core-utils"),
13-
],
147
required_for_source_only_abi = True,
158
visibility = [
169
"PUBLIC",
@@ -31,4 +24,7 @@ rn_android_library(
3124
react_native_target("java/com/facebook/react/views/text:text"),
3225
react_native_target("java/com/facebook/react/views/view:view"),
3326
],
27+
exported_deps = [
28+
react_native_dep("third-party/android/androidx:appcompat"),
29+
],
3430
)

ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import android.view.inputmethod.EditorInfo;
3131
import android.view.inputmethod.InputConnection;
3232
import android.view.inputmethod.InputMethodManager;
33-
import android.widget.EditText;
3433
import androidx.annotation.Nullable;
34+
import androidx.appcompat.widget.AppCompatEditText;
3535
import androidx.core.view.AccessibilityDelegateCompat;
3636
import androidx.core.view.ViewCompat;
3737
import com.facebook.infer.annotation.Assertions;
@@ -59,7 +59,7 @@
5959
* called this explicitly. This is the default behavior on other platforms as well.
6060
* VisibleForTesting from {@link TextInputEventsTestCase}.
6161
*/
62-
public class ReactEditText extends EditText {
62+
public class ReactEditText extends AppCompatEditText {
6363

6464
private final InputMethodManager mInputMethodManager;
6565
// This flag is set to true when we set the text of the EditText explicitly. In that case, no

0 commit comments

Comments
 (0)