HK.avdalyan
HK.avdalyan

Reputation: 734

AppCompat ProgressBar height

How to change the height of AppCompat ProgressBar?
I try with this, but no result

<ProgressBar
    android:id="@+id/progressBar"
    style="@style/Widget.AppCompat.ProgressBar.Horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:indeterminate="false"
    android:max="100"
    android:progress="60"
    android:minHeight="20dp"
    android:maxHeight="20dp"
    android:progressBackgroundTint="@color/pbarbg"
    android:theme="@style/LinearProgress" />

And in LinearProgress style I have

<style name="LinearProgress" parent="Theme.AppCompat.Light">
    <item name="colorAccent">@color/pbaractive</item>
</style>

Upvotes: 6

Views: 2383

Answers (1)

Rami
Rami

Reputation: 7929

You can use setScaleY() method, to scale your ProgressBar in Y-axis.

eg: yourProgressBar.setScaleY(2f);

Upvotes: 11

Related Questions