1"use strict";(self.webpackChunkreact_native_website=self.webpackChunkreact_native_website||[]).push([["10369"],{61309(e,r,n){n.r(r),n.d(r,{metadata:()=>s,default:()=>h,frontMatter:()=>i,contentTitle:()=>l,toc:()=>c,assets:()=>a});var s=JSON.parse('{"id":"progressbarandroid","title":"\u{1F6A7} ProgressBarAndroid","description":"\u5DF2\u8FC7\u65F6\u3002 Use @react-native-community/progress-bar-android instead.","source":"@site/versioned_docs/version-0.81/progressbarandroid.md","sourceDirName":".","slug":"/progressbarandroid","permalink":"/docs/0.81/progressbarandroid","draft":false,"unlisted":false,"editUrl":"https://github.com/reactnativecn/react-native-website/blob/production/cnwebsite/../cndocs/progressbarandroid.md","tags":[],"version":"0.81","frontMatter":{"id":"progressbarandroid","title":"\u{1F6A7} ProgressBarAndroid"}}'),t=n(62540),d=n(43023);let i={id:"progressbarandroid",title:"\u{1F6A7} ProgressBarAndroid"},l,a={},c=[{value:"\u793A\u4F8B",id:"\u793A\u4F8B",level:3},{value:"Props",id:"props",level:2},{value:"<code>animating</code>",id:"animating",level:3},{value:"<code>color</code>",id:"color",level:3},{value:"<code>indeterminate</code>",id:"indeterminate",level:3},{value:"<code>progress</code>",id:"progress",level:3},{value:"<code>styleAttr</code>",id:"styleattr",level:3},{value:"<code>testID</code>",id:"testid",level:3}];function o(e){let r={a:"a",blockquote:"blockquote",code:"code",div:"div",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.blockquote,{children:["\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"\u5DF2\u8FC7\u65F6\u3002"})," Use ",(0,t.jsx)(r.a,{href:"https://github.com/react-native-community/progress-bar-android",children:"@react-native-community/progress-bar-android"})," instead."]}),"\n"]}),"\n",(0,t.jsxs)(r.p,{children:["\u5C01\u88C5\u4E86 Android \u5E73\u53F0\u4E0A\u7684",(0,t.jsx)(r.code,{children:"ProgressBar"}),"\u7684 React \u7EC4\u4EF6\u3002\u8FD9\u4E2A\u7EC4\u4EF6\u53EF\u4EE5\u7528\u6765\u8868\u793A\u5E94\u7528\u6B63\u5728\u52A0\u8F7D\u6216\u8005\u6709\u4E9B\u4E8B\u60C5\u6B63\u5728\u8FDB\u884C\u4E2D\u3002"]}),"\n",(0,t.jsx)(r.h3,{id:"\u793A\u4F8B",children:"\u793A\u4F8B"}),"\n",(0,t.jsx)(r.div,{className:"snack-player","data-snack-name":"ProgressBarAndroid","data-snack-description":"Example usage","data-snack-files":"%7B%22App.tsx%22%3A%7B%22type%22%3A%22CODE%22%2C%22contents%22%3A%22import%20React%20from%20'react'%3B%5Cnimport%20%7BView%2C%20StyleSheet%2C%20ProgressBarAndroid%2C%20Text%7D%20from%20'react-native'%3B%5Cn%5Cnconst%20App%20%3D%20()%20%3D%3E%20%7B%5Cn%20%20return%20(%5Cn%20%20%20%20%3CView%20style%3D%7Bstyles.container%7D%3E%5Cn%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.example%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CText%3ECircle%20Progress%20Indicator%3C%2FText%3E%5Cn%20%20%20%20%20%20%20%20%3CProgressBarAndroid%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2FView%3E%5Cn%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.example%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CText%3EHorizontal%20Progress%20Indicator%3C%2FText%3E%5Cn%20%20%20%20%20%20%20%20%3CProgressBarAndroid%20styleAttr%3D%5C%22Horizontal%5C%22%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2FView%3E%5Cn%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.example%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CText%3EColored%20Progress%20Indicator%3C%2FText%3E%5Cn%20%20%20%20%20%20%20%20%3CProgressBarAndroid%20styleAttr%3D%5C%22Horizontal%5C%22%20color%3D%5C%22%232196F3%5C%22%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2FView%3E%5Cn%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.example%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CText%3EFixed%20Progress%20Value%3C%2FText%3E%5Cn%20%20%20%20%20%20%20%20%3CProgressBarAndroid%5Cn%20%20%20%20%20%20%20%20%20%20styleAttr%3D%5C%22Horizontal%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20indeterminate%3D%7Bfalse%7D%5Cn%20%20%20%20%20%20%20%20%20%20progress%3D%7B0.5%7D%5Cn%20%20%20%20%20%20%20%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2FView%3E%5Cn%20%20%20%20%3C%2FView%3E%5Cn%20%20)%3B%5Cn%7D%5Cn%5Cnconst%20styles%20%3D%20StyleSheet.create(%7B%5Cn%20%20container%3A%20%7B%5Cn%20%20%20%20flex%3A%201%2C%5Cn%20%20%20%20justifyContent%3A%20'center'%2C%5Cn%20%20%20%20alignItems%3A%20'center'%2C%5Cn%20%20%7D%2C%5Cn%20%20example%3A%20%7B%5Cn%20%20%20%20marginVertical%3A%2024%2C%5Cn%20%20%7D%2C%5Cn%7D
1)%3B%5Cn%5Cnexport%20default%20App%3B%22%7D%7D","data-snack-dependencies":"react-native-safe-area-context","data-snack-platform":"web","data-snack-supported-platforms":"android","data-snack-theme":"light","data-snack-preview":"true","data-snack-loading":"lazy","data-snack-device-appearance":"light","data-snack-device-frame":"false"}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h1,{id:"\u6587\u6863",children:"\u6587\u6863"}),"\n",(0,t.jsx)(r.h2,{id:"props",children:"Props"}),"\n",(0,t.jsx)(r.h3,{id:"animating",children:(0,t.jsx)(r.code,{children:"animating"})}),"\n",(0,t.jsx)(r.p,{children:"\u662F\u5426\u663E\u793A\u8FDB\u5EA6\u6761\uFF08\u9ED8\u8BA4\u4E3A true \u663E\u793A\uFF09\u3002"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"bool"}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h3,{id:"color",children:(0,t.jsx)(r.code,{children:"color"})}),"\n",(0,t.jsx)(r.p,{children:"\u8FDB\u5EA6\u6761\u7684\u989C\u8272\u3002"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.a,{href:"/docs/0.81/colors",children:"color"})}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h3,{id:"indeterminate",children:(0,t.jsx)(r.code,{children:"indeterminate"})}),"\n",(0,t.jsxs)(r.p,{children:["\u51B3\u5B9A\u8FDB\u5EA6\u6761\u662F\u5426\u8981\u663E\u793A\u4E00\u4E2A\u4E0D\u786E\u5B9A\u7684\u8FDB\u5EA6\u3002\u6CE8\u610F\u8FD9\u4E2A\u5728 styleAttr \u662F Horizontal \u7684\u65F6\u5019\u5FC5\u987B\u662F false\uFF0C\u5E76\u4E14\u9700\u8981\u8BBE\u7F6E",(0,t.jsx)(r.code,{children:"progress"}),"\u503C\u3002"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"indeterminateType"}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h3,{id:"progress",children:(0,t.jsx)(r.code,{children:"progress"})}),"\n",(0,t.jsx)(r.p,{children:"\u5F53\u524D\u7684\u8FDB\u5EA6\u503C\uFF08\u5728 0 \u5230 1 \u4E4B\u95F4\uFF09\u3002"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"number"}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h3,{id:"styleattr",children:(0,t.jsx)(r.code,{children:"styleAttr"})}),"\n",(0,t.jsx)(r.p,{children:"\u8FDB\u5EA6\u6761\u7684\u6837\u5F0F\u3002\u53EF\u53D6\u503C\u6709\uFF1A"}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:"Horizontal"}),"\n",(0,t.jsx)(r.li,{children:"Normal (default)"}),"\n",(0,t.jsx)(r.li,{children:"Small"}),"\n",(0,t.jsx)(r.li,{children:"Large"}),"\n",(0,t.jsx)(r.li,{children:"Inverse"}),"\n",(0,t.jsx)(r.li,{children:"SmallInverse"}),"\n",(0,t.jsx)(r.li,{children:"LargeInverse"}),"\n"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"enum('Horizontal', 'Normal', 'Small', 'Large', 'Inverse', 'SmallInverse', 'LargeInverse')"}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]}),"\n",(0,t.jsx)(r.hr,{}),"\n",(0,t.jsx)(r.h3,{id:"testid",children:(0,t.jsx)(r.code,{children:"testID"})}),"\n",(0,t.jsx)(r.p,{children:"\u7528\u6765\u5728\u7AEF\u5230\u7AEF\u6D4B\u8BD5\u4E2D\u5B9A\u4F4D\u8FD9\u4E2A\u89C6\u56FE\u3002"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"\u7C7B\u578B"}),(0,t.jsx)(r.th,{children:"\u5FC5\u9700"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"string"}),(0,t.jsx)(r.td,{children:"\u5426"})]})})]})]})}function h(e={}){let{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},43023(e,r,n){n.d(r,{R:()=>i,x:()=>l});var s=n(63696);let t={},d=s.createContext(t);function i(e){let r=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(d.Provider,{value:r},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.