Skip to content

Commit adc1410

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
ReactPicker extends AppCompatSpinner (facebook#23303)
Summary: Google recommends to extend AppCompat widget, and this PR changes ReactPicker to extend AppCompatSpinner. [Android] [Changed] - ReactPicker extends AppCompatSpinner Pull Request resolved: facebook#23303 Differential Revision: D13973918 Pulled By: cpojer fbshipit-source-id: f925994eb631815c7461ed519701cd77e7068f38
1 parent 3cca9e7 commit adc1410

File tree

4 files changed

+9
-3
lines changed
  • ReactAndroid/src
    • androidTest/java/com/facebook/react/tests
    • main

4 files changed

+9
-3
lines changed

ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ rn_android_library(
77
"PUBLIC",
88
],
99
deps = [
10+
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
1011
react_native_dep("third-party/android/support/v4:lib-support-v4"),
1112
react_native_dep("third-party/java/jsr-305:jsr-305"),
1213
react_native_dep("third-party/java/junit:junit"),

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

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ rn_android_library(
66
visibility = [
77
"PUBLIC",
88
],
9+
provided_deps = [
10+
react_native_dep("third-party/android/support/v4:lib-support-v4"),
11+
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
12+
],
913
deps = [
1014
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
1115
react_native_dep("third-party/java/jsr-305:jsr-305"),

ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package com.facebook.react.views.picker;
99

1010
import android.content.Context;
11+
import android.support.v7.widget.AppCompatSpinner;
1112
import android.util.AttributeSet;
1213
import android.view.View;
1314
import android.widget.AdapterView;
@@ -17,9 +18,9 @@
1718

1819
import javax.annotation.Nullable;
1920

20-
public class ReactPicker extends Spinner {
21+
public class ReactPicker extends AppCompatSpinner {
2122

22-
private int mMode = MODE_DIALOG;
23+
private int mMode = Spinner.MODE_DIALOG;
2324
private @Nullable Integer mPrimaryColor;
2425
private @Nullable OnSelectListener mOnSelectListener;
2526
private @Nullable Integer mStagedSelection;

ReactAndroid/src/main/third-party/android/support/v7/appcompat-orig/BUCK

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ rn_android_library(
1919
":res-for-appcompat",
2020
],
2121
exported_deps = [
22-
":classes-for-react-native",
22+
":classes-for-react-native"
2323
],
2424
)
2525

0 commit comments

Comments
 (0)