Is it possible to increase the height of the line inside the progress bar ?
I fixed it like this:
I created a custom progress bar xml file inside drawable folder:
progress_bar_states.xml:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="@color/colorGray"
android:centerColor="@color/colorGray"
android:endColor="@color/colorGray"
/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="@color/colorBlue"
android:centerColor="@color/colorBlue"
android:endColor="@color/colorBlue"
/>
</shape>
</clip>
</item>
</layer-list>
And in my layout:
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indeterminateOnly="false"
android:id="@+id/progressBar"
android:gravity="left"
android:progressDrawable="@drawable/progress_bar_states"
android:layout_weight="1"
android:layout_marginBottom="10dp"
android:layout_marginLeft="15dp" />
Try the following code:
mProgressBar.setScaleY(3f);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With