【发布时间】:2019-11-21 02:29:36
【问题描述】:
我有一个progressbar_text TextView:
<TextView
android:id="progressbar_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
和一个 custom_animated_shape.xml 为:
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:toDegrees="270">
<shape
android:innerRadius="20dp"
android:innerRadiusRatio="2.5"
android:shape="ring"
android:thickness="5dp"
android:useLevel="true">
<gradient
android:angle="0"
android:endColor="@color/foo_color"
android:startColor="@color/foo_color"
android:type="sweep"
android:useLevel="false"/>
</shape>
</animated-rotate>
设置为:
progressbar_text.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.custom_animated_shape, 0, 0, 0)
不会工作
有没有办法将 循环进度条设置为 Left Drawable 到 TextView?
【问题讨论】:
标签: android android-animation android-xml android-drawable android-progressbar