W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
React 組建包裹了只是 Android 部分的 ProgressBar
。這個(gè)組件是被用來提示這個(gè)應(yīng)用正在加載或者在應(yīng)用里面有一些操作。
例子:
render: function() { var progressBar = <View style={styles.container}> <ProgressBar styleAttr="Inverse" /> </View>; return ( <MyLoadingComponent componentView={componentView} loadingView={progressBar} style={styles.loadingComponent} /> ); },
styleAttr 樣式屬性
進(jìn)度條的樣式,包括:
Horizontal
Small
Large
Inverse
SmallInverse
LargeInverse
testID 字符串 在端對(duì)端測(cè)試?yán)锩姹挥脕矶ㄎ贿@個(gè)視圖。
'use strict';var ProgressBar = require('ProgressBarAndroid');var React = require('React');var UIExplorerBlock = require('UIExplorerBlock');var UIExplorerPage = require('UIExplorerPage');var ProgressBarAndroidExample = React.createClass({ statics: { title: '<ProgressBarAndroid>', description: 'Visual indicator of progress of some operation. ' + 'Shows either a cyclic animation or a horizontal bar.', }, render: function() { return ( <UIExplorerPage title="ProgressBar Examples"> <UIExplorerBlock title="Default ProgressBar"> <ProgressBar /> </UIExplorerBlock> <UIExplorerBlock title="Small ProgressBar"> <ProgressBar styleAttr="Small" /> </UIExplorerBlock> <UIExplorerBlock title="Large ProgressBar"> <ProgressBar styleAttr="Large" /> </UIExplorerBlock> <UIExplorerBlock title="Inverse ProgressBar"> <ProgressBar styleAttr="Inverse" /> </UIExplorerBlock> <UIExplorerBlock title="Small Inverse ProgressBar"> <ProgressBar styleAttr="SmallInverse" /> </UIExplorerBlock> <UIExplorerBlock title="Large Inverse ProgressBar"> <ProgressBar styleAttr="LargeInverse" /> </UIExplorerBlock> </UIExplorerPage> ); }, });module.exports = ProgressBarAndroidExample;
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: