当前位置:网站首页>8、 Slider assembly
8、 Slider assembly
2022-06-22 07:26:00 【Running water I love】
Slider Components
Reference documents :https://github.com/callstack/react-native-slider
Installation & Usage
To install this module cd to your project directory and enter the following command:
yarn add @react-native-community/slider
or
npm install @react-native-community/slider --save
If using iOS please remember to install cocoapods by running: npx pod-install
For web support please use @react-native-community/[email protected]
Migrating from the core react-native module
This module was created when the Slider was split out from the core of React Native.
To migrate to this module you need to follow the installation instructions above and then change you imports from:
import { Slider } from 'react-native';
to:
import Slider from '@react-native-community/slider';
example
import React, {
useState} from "react";
import {
View, StyleSheet ,Text} from "react-native";
import Slider from "@react-native-community/slider";
const Index = () => {
const [sliderValue,setSliderValue] = useState(0);
return (
<View>
<Slider
style={
{
width: 200, height: 40 }}
minimumValue={
0}
maximumValue={
20}
step={
2}
value={
sliderValue}
minimumTrackTintColor="blue"
// maximumTrackTintColor="#000000"
maximumTrackTintColor="grey"
onValueChange={
(value)=>{
setSliderValue(value)}}
/>
<Text> The value set is :{
sliderValue}</Text>
</View>
);
};
export default Index;
边栏推荐
- Open version - account information synchronization and unification
- Authority management of okcc call center
- [v4.3] the applet fails to receive the subscription message, and the coupon time on the product details page is displayed incorrectly
- Open version - inventory description
- Open source get through version - integral function
- Article editing test of CSDN
- chrome浏览器查看cookie方法
- 网站的日常维护
- Site pre cache code
- Real MySQL interview questions (20) -- video data analysis practice
猜你喜欢

Speed planning generation of coursera self driving car Part4 motion planning

How was the coffee supply chain leveled?

Antd framework: click the link to reopen the browser page - Basic accumulation

Tikz learning notes (IV) further exploration of circle and complex geometry

Taobao assistant can not be used. How to export the baby in the warehouse to backup the data package

2 lines of text on the right of the left Avatar

Résumé semestriel du programmeur de 33 ans

Canoe uses tricks to export data from logging file/trace to Matlab for analysis

Taobao store backup one store upload to multiple stores precautions

Crmeb mall distribution function
随机推荐
C语言实现的简易考试系统
[usecols parameter of pd.read\u excel ((), list error reason]
Assembly learning Chapter 4 of assembly language (Third Edition) written by Wang Shuang
Image interpolation (nearest neighbor, bilinear)
DETR3D模型源码导读 & MMDetection3D构建流程
如何解决‘WebDriver‘ object has no attribute ‘switch_to_window‘
《百度搜索引擎网页质量白皮书》指导网站建设及优化
Flutter uses the for loop
Batch collection, grab Taobao baby, upload and collect commodity software
Speed planning generation of coursera self driving car Part4 motion planning
How to upload Taobao tmall products with one click
Téléchargement de toutes les versions de chromedriver
Does it matter if you delete the pictures in the picture space after uploading to the store
Canoe learning notes (6) diagram of logging block data recording module
Get through version - bargain activity
How to import Taobao products into another store
Open version - user level
How to prevent event propagation in JS
CONDA installation method of deepmd kit and the solution of slow speed
Use of the thrust Library in CUDA