# MaterialProgressBar **Repository Path**: baijuncheng-open-source/MaterialProgressBar ## Basic Information - **Project Name**: MaterialProgressBar - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-05-28 - **Last Updated**: 2021-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MaterialProgressBar ## Preview ![image](images/image.gif) ![materialprogressbar](https://images.gitee.com/uploads/images/2021/0608/172109_b5b295c3_8230582.jpeg "materialprogressbar.sample.jpg") ## Integration Step 1.先在项目build.gradle的repositories添加对maven仓的依赖: ``` allprojects { repositories { mavenCentral() } } ``` Step 2.然后在entry中build.gradle的dependencies中添加对library的依赖: ```gradle dependencies { implementation 'com.gitee.baijuncheng-open-source:materialprogressbar:1.0.1' } ``` ## Usage You can either simply use the `MaterialProgressbar` widget , or use the regular `ProgressBar` from the SDK. ### Using Widget Simply replace your `ProgressBar` with `MaterialProgressBar`, and remember to apply corresponding style and attribute for correct behavior. For example, to create an indeterminate circular `MaterialProgressBar`: ```xml ``` Available custom attributes: - `app:mpb_progressStyle`: Style of progress element: `circular` or `horizontal`. Defaults to `circular`. - `app:mpb_progressInfiniteStyle`: Style of determinate circular progress element: normal or dynamic. Defaults to `normal`. - `app:mpb_progressTint`: Color of progressbar. Default to #008000. - `app:mpb_progressTintMode`: BlendMode of progressbar. Default to BlendMode.SRC_IN. - `app:mpb_secondaryProgressTint`: Color of secondary progressbar. Unsupport by default and need to be customized. - `app:mpb_secondaryProgressTintMode`: BlendMode of secondary progressbar. Default to BlendMode.SRC_IN. - `app:mpb_progressBackgroundTint`: Color of progressbar. Unsupport by default and need to be customized. - `app:mpb_progressBackgroundTintMode`: BlendMode of progressbar background. Default to BlendMode.SRC_IN. For a detailed example, you can refer to the `onCreate()` method of the sample's MainAbility and DeterminateCircularSampleActivity. ## License Copyright 2015 Hai Zhang Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.