I'm new to XML language and have no clue on how to put and ImageButton
inside a circular progress bar
and also have no clue if that's even possible.
Asked
Active
Viewed 785 times
0

Mad Physicist
- 107,652
- 25
- 181
- 264

Yahya Odeh
- 39
- 4
1 Answers
0
No. If you want to customize ProgressBar you need to set Style
and android:progressDrawable
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleHorizontal"
android:progressDrawable="@drawable/custom_progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
then you can create Layer-List
Drawable or any other drawable.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Define the background properties like color etc -->
<item android:id="@android:id/background">
<shape>
<gradient
android:startColor="#000001"
android:centerColor="#0b131e"
android:centerY="1.0"
android:endColor="#0d1522"
android:angle="270"
/>
</shape>
</item>
<!-- Define the progress properties like start color, end color etc -->
<item android:id="@android:id/progress">
<clip>
<shape>
<gradient
android:startColor="#007A00"
android:centerColor="#007A00"
android:centerY="1.0"
android:endColor="#06101d"
android:angle="270"
/>
</shape>
</clip>
</item>
</layer-list>
check out this

Community
- 1
- 1

Elias Fazel
- 2,093
- 16
- 20
-
Thanks a lot I appreciate it – Yahya Odeh Mar 14 '17 at 14:15