Skip to content

Commit 833429d

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
ReactSlider extends AppCompatSeekBar (#23304)
Summary: Google recommends to use AppCompat widgets, and this PR changes ReactSlider to extend AppCompatSeekBar. [Android] [Changed] - ReactSlider extends AppCompatSeekBar Pull Request resolved: #23304 Differential Revision: D13973636 Pulled By: cpojer fbshipit-source-id: 9aa160b186fcea593224c5760a2de0fc3a2b6f85
1 parent 185320d commit 833429d

File tree

3 files changed

+4
-6
lines changed
  • ReactAndroid/src/main

3 files changed

+4
-6
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
33
rn_android_library(
44
name = "slider",
55
srcs = glob(["*.java"]),
6-
provided_deps = [
7-
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
8-
],
96
visibility = [
107
"PUBLIC",
118
],
129
deps = [
1310
YOGA_TARGET,
11+
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
12+
react_native_dep("third-party/android/support/v4:lib-support-v4"),
1413
react_native_dep("third-party/java/jsr-305:jsr-305"),
1514
react_native_target("java/com/facebook/react/bridge:bridge"),
1615
react_native_target("java/com/facebook/react/common:common"),

ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import android.content.Context;
1010
import android.os.Build;
11+
import android.support.v7.widget.AppCompatSeekBar;
1112
import android.util.AttributeSet;
12-
import android.widget.SeekBar;
1313
import javax.annotation.Nullable;
1414

1515
/**
@@ -20,7 +20,7 @@
2020
*
2121
* <p>Note that the slider is _not_ a controlled component (setValue isn't called during dragging).
2222
*/
23-
public class ReactSlider extends SeekBar {
23+
public class ReactSlider extends AppCompatSeekBar {
2424

2525
/**
2626
* If step is 0 (unset) we default to this total number of steps. Don't use 100 which leads to

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ rn_android_library(
2020
],
2121
exported_deps = [
2222
":classes-for-react-native",
23-
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
2423
],
2524
)
2625

0 commit comments

Comments
 (0)