The question seems stupid but I'm not able to simply define the height of a ProgressBar. Neither in code nor the xml file. The layout_height property seems act as the margin one, and the original size is much more smaller that I want. I have found almost nothing on the subject so I'm quite confuse.
The SO answer here don't works for me. And I am targeting API 15.
Is anybody has a solution or an explanation ?
It was a stupid mistake. I had paste a sample code like this :
<ProgressBar
android:id="@+id/status_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
However the style attribute override all others...
To obtain a "basic" horizontal ProgressBar you have to set some attributes:
<ProgressBar
android:id="@+id/pb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:progressDrawable="@android:drawable/progress_horizontal"
android:indeterminate="false"
android:indeterminateOnly="false"/>
Of course, some other predefined styles are also available.
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