# Ohos-SVProgressHUD-master **Repository Path**: baijuncheng-open-source/ohos-svprogress-hud-master ## Basic Information - **Project Name**: Ohos-SVProgressHUD-master - **Description**: 一个精仿ios提示的弹窗提示库,包括加载动画,失败与成功提示等 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 2 - **Created**: 2021-04-06 - **Last Updated**: 2022-09-06 ## Categories & Tags **Categories**: harmonyos-progress **Tags**: None ## README SVProgressHUD ================== A reminder library that imatate ios for HarmonyOS. ## Demo Demo is dependent on Module, you can also use gradle dependency: Usage ===== /** *The project provide you the next methods to use the variuos reminder. *Methods provided by Class SVProgressHUD in Module svprogresshud **/ remote maven repo integration Add the following code in the entry's gradle: ```xml implementation 'com.gitee.baijuncheng-open-source: Ohos-SVProgressHUD:1.0.0' ``` ``` public void show() { if(isShowing())return; setMaskType(SVProgressHUDMaskType.Black); mSharedView.show(); svShow(); }/*detailed show*/ public void showWithMaskType(SVProgressHUDMaskType maskType) {} public void showWithStatus(String string) {} public void showInfoWithStatus(String string, SVProgressHUDMaskType maskType) {} public void showSuccessWithStatus(String string) {} public void showErrorWithStatus(String string, SVProgressHUDMaskType maskType) {} public void showWithProgress(String string, SVProgressHUDMaskType maskType) {} ``` /** *As the reminder UI is provided by Class SVProgressDefaultView and Class SVCircleProgressBar **/ ``` public void show() { mRotateAnimation.cancel(); ivBigLoading.setPixelMap(resBigLoading); ivBigLoading.setVisibility(Component.VISIBLE); ivSmallLoading.setVisibility(Component.HIDE); circleProgressBar.setVisibility(Component.HIDE); tvMsg.setVisibility(Component.HIDE); //开启旋转动画 mRotateAnimation.setTarget(ivBigLoading); ivBigLoading.setBindStateChangedListener(new Component.BindStateChangedListener(){ @Override public void onComponentBoundToWindow(Component component) { mRotateAnimation.start(); } @Override public void onComponentUnboundFromWindow(Component component) { mRotateAnimation.end(); } }); } public void showWithStatus(String string) {} public void showInfoWithStatus(String string) { showBaseStatus(resInfo, string); } public void showSuccessWithStatus(String string) { showBaseStatus(resSuccess, string); } public void showErrorWithStatus(String string) { showBaseStatus(resError, string); } public void showWithProgress(String string) { showProgress(string); } ``` Detail code you may should refer to the Class. License ===================== ``` Copyright (C) 2014 tvbarthel 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. ```