I am working with a SeekBar
that works perfectly fine. But I want to increase the height of the Progress bar, as the native height is not as high.
So how can I change the height of the progress bar, either dynamically or through XML?
None of the above works, simply set android:layout_height="10dp" to whatever value you want!
You try set Grid width=100 or bigger. And the ProgressRing should set HorizontalAlignment and verticalAlignment to Stretch and not any width,height and margin.
You can use the Slider provided by the Material Components Library. Use the app:trackHeight="xxdp" (the default value is 4dp ) to change the height of the track bar. It requires the version 1.2. 0 of the library.
A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys. Placing focusable widgets to the left or right of a SeekBar is discouraged. Clients of the SeekBar can attach a SeekBar.
You have to add some padding for all directions and also set the min and max height of the SeekBar.
Here is one example that I used:
<?xml version="1.0" encoding="utf-8"?>
<SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressDrawable="@drawable/custom_player_seekbar_background"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:thumb="@drawable/bt_do_player"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:minHeight="6dp"
android:maxHeight="6dp"
android:layout_centerVertical="true"/>
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