Skip to content

Commit

Permalink
ReactPicker extends AppCompatSpinner (#23303)
Browse files Browse the repository at this point in the history
Summary:
Google recommends to extend AppCompat widget, and this PR changes ReactPicker to extend AppCompatSpinner.

[Android] [Changed] - ReactPicker extends AppCompatSpinner
Pull Request resolved: #23303

Differential Revision: D13973918

Pulled By: cpojer

fbshipit-source-id: f925994eb631815c7461ed519701cd77e7068f38
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Feb 6, 2019
1 parent 3cca9e7 commit adc1410
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/junit:junit"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ rn_android_library(
visibility = [
"PUBLIC",
],
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
],
deps = [
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.facebook.react.views.picker;

import android.content.Context;
import android.support.v7.widget.AppCompatSpinner;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -17,9 +18,9 @@

import javax.annotation.Nullable;

public class ReactPicker extends Spinner {
public class ReactPicker extends AppCompatSpinner {

private int mMode = MODE_DIALOG;
private int mMode = Spinner.MODE_DIALOG;
private @Nullable Integer mPrimaryColor;
private @Nullable OnSelectListener mOnSelectListener;
private @Nullable Integer mStagedSelection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rn_android_library(
":res-for-appcompat",
],
exported_deps = [
":classes-for-react-native",
":classes-for-react-native"
],
)

Expand Down

0 comments on commit adc1410

Please sign in to comment.