반응형
반응형
custom_progressbar.xml
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="1800">
<shape
android:shape="ring"
android:useLevel="false">
<gradient
android:endColor="@color/view_color"
android:startColor="@color/progressbar"
android:thicknessRatio="50"
android:type="sweep"
android:useLevel="false" />
</shape>
</rotate>
MainActivity.class
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
private void showProgress(final boolean show) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
}
}
반응형
'Mobile > Android' 카테고리의 다른 글
[ Android ] Custom Button 커스텀 버튼 색 변경 (0) | 2023.07.22 |
---|---|
[ Android ] 손쉽게 Custom Toast 만들기 (0) | 2023.07.22 |
[ Android ] Activity 와 Intent 이해하기 (0) | 2023.07.21 |
[ Android ] Activity Fragment 데이터 전달 (0) | 2023.07.21 |
[ Android ] 한 눈에 보는 Activity Flag 액티비티 플래그 (0) | 2023.07.21 |