mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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: https://github.com/facebook/react-native/pull/23304 Differential Revision: D13973636 Pulled By: cpojer fbshipit-source-id: 9aa160b186fcea593224c5760a2de0fc3a2b6f85
This commit is contained in:
committed by
Facebook Github Bot
parent
185320db23
commit
833429dd63
@@ -3,14 +3,13 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "slider",
|
||||
srcs = glob(["*.java"]),
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||
],
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
YOGA_TARGET,
|
||||
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_target("java/com/facebook/react/bridge:bridge"),
|
||||
react_native_target("java/com/facebook/react/common:common"),
|
||||
|
||||
@@ -8,8 +8,8 @@ package com.facebook.react.views.slider;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.support.v7.widget.AppCompatSeekBar;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.SeekBar;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ import javax.annotation.Nullable;
|
||||
*
|
||||
* <p>Note that the slider is _not_ a controlled component (setValue isn't called during dragging).
|
||||
*/
|
||||
public class ReactSlider extends SeekBar {
|
||||
public class ReactSlider extends AppCompatSeekBar {
|
||||
|
||||
/**
|
||||
* If step is 0 (unset) we default to this total number of steps. Don't use 100 which leads to
|
||||
|
||||
Reference in New Issue
Block a user