마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

도넛 모양 + 그라데이션 컬러 + 둥근 귀퉁이를 가진 프로그래스바 보신 분 계신가요?

0 추천

http://stackoverflow.com/questions/27213381/how-to-create-circular-progressbar-in-android

요런 모양의 프로그래스바를 만들고 싶은데, 그라데이션은 아래의 코드로 넣었는데, 귀퉁이를 깍으려고 넣은 corners 는 동작을 안하네요. 

혹시 그라데이션이랑 귀퉁이 깍인 프로그래스바를 만드는 방법이나 라이브러리 아는 분 계신가요?

 

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
        android:fromDegrees="270"
        android:toDegrees="270">
  <shape
    android:innerRadiusRatio="2.5"
    android:shape="ring"
    android:thickness="5dp"
    android:useLevel="true">

    <gradient
      android:angle="0"
      android:centerColor="#7f97f5"
      android:endColor="#4dd1cf"
      android:startColor="#bd5df5"
      android:type="sweep"
      android:useLevel="false"/>

    <corners android:radius="10dp"/>

  </shape>
</rotate>

 

<ProgressBar
  style="?android:attr/progressBarStyleHorizontal"
  android:layout_width="100dp"
  android:layout_height="100dp"
  android:indeterminate="false"
  android:max="100"
  android:progressDrawable="@drawable/circular_progress_bar_foreground"/>

 

 

 

 

쎄미 (162,410 포인트) 님이 2017년 3월 23일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...