• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

react-native-progress-view/progress-view: ProgressView Component for react-nativ ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

react-native-progress-view/progress-view

开源软件地址(OpenSource Url):

https://github.com/react-native-progress-view/progress-view

开源编程语言(OpenSource Language):

JavaScript 30.8%

开源软件介绍(OpenSource Introduction):

@react-native-community/progress-view

Build Status Windows CI Status Version Platforms MIT License Lean Core Badge

ProgressBar Component for macOS, iOS (based on UIProgressView), Android, and Windows.

macOS iOS Android Windows
>

Getting started

npm install @react-native-community/progress-view --save

or

yarn add @react-native-community/progress-view

Linking

  • React Native 0.60+

The package is automatically linked when building the app. All you need to do is:

npx pod-install
  • React Native <= 0.59

Run the following commands

react-native link @react-native-community/progress-view

Windows

Add the progress-view project to your solution.
  1. Open the solution in Visual Studio 2019
  2. Right-click Solution icon in Solution Explorer > Add > Existing Project Select node_modules\@react-native-community\progress-view\windows\progress-view\progress-view.vcxproj
windows/myapp.sln

Add a reference to progress-view to your main application project. From Visual Studio 2019:

Right-click main application project > Add > Reference... Check progress-view from Solution Projects.

pch.h

Add #include "winrt/progress_view.h".

app.cpp

Add PackageProviders().Append(winrt::progress_view::ReactPackageProvider()); before InitializeComponent();.

Manual installation

IOS

Manually linking the library - iOS
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modules@react-native-community/progress-view and add RNCProgressView.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCProgressView.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)

Usage

Import ProgressView from @react-native-community/progress-view

import {ProgressView} from "@react-native-community/progress-view";

Add ProgressView like this

<ProgressView
          progressTintColor="orange"
          trackTintColor="blue"
          progress={0.7}
/>

Running Example App

Windows

  1. Clone branch
  2. cd into progress_view and run yarn install
  3. Start metro server with yarn start:windows
  4. Open Visual Studios and open example/windows/ProgressViewExample.sln
  5. Set to Debug x64 and start solution

IOS

  1. Clone branch
  2. cd into progress-view and run yarn install
  3. cd into example/ios and run pod install
  4. cd back into progress-view and run yarn ios

macOS

  1. Clone branch
  2. cd into progress-view and run yarn install
  3. cd into example/macos/example/macos and run pod install
  4. Open the newly created example.xcworkspace in Xcode, build, and run

Reference

Props


Reference

Props

progress

The progress value (between 0 and 1).

Type Required
number No

progressImage

A stretchable image to display as the progress bar.

Type Required
Image.propTypes.source No

progressTintColor

The tint color of the progress bar itself.

Type Required
string No

progressViewStyle

The progress bar style. Network images only work on Windows.

Type Required
enum('default', 'bar') No

trackImage

A stretchable image to display behind the progress bar. Network images only work on Windows.

Type Required
Image.propTypes.source No

trackTintColor

The tint color of the progress bar track.

Type Required
string No

isIndeterminate

Turns progress bar into an indeterminate progress bar

Type Required Platform
bool No Windows

Contributors

License

The library is released under the MIT license. For more information see LICENSE.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mre/timelapse: 发布时间:2022-08-18
下一篇:
nextive/NextiveJson: A fast JSON parser for iOS and MacOS发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap