h6ah4i / android-verticalseekbar

Vertical SeekBar class which supports Android 4.x - 9.x.
Apache License 2.0
507 stars 96 forks source link

Adding background #9

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi,

I'm using v0.7.2.

I want to add an ImageView behind the vertical seek bar. To do that, I do these steps:

XML layout looks like this:

<FrameLayout
    android:layout_width='wrap_content'
    android:layout_height='wrap_content'>

     <ImageView
        android:layout_width='wrap_content'
        android:layout_height='wrap_content'
        android:layout_gravity='center'
        android:src='@drawable/...'/>

    <com.h6ah4i.android.widget.verticalseekbar.VerticalSeekBarWrapper
        android:layout_width='wrap_content'
        android:layout_height='150dp'
        android:layout_gravity='center_horizontal'>

        <!-- NOTE: android:splitTrack="false" is required for Android N+. -->
        <com.h6ah4i.android.widget.verticalseekbar.VerticalSeekBar
            android:layout_width='0dp'
            android:layout_height='0dp'
            android:splitTrack='false'
            app:seekBarRotation='CW270' /> <!-- Rotation: CW90 or CW270 -->
    </com.h6ah4i.android.widget.verticalseekbar.VerticalSeekBarWrapper>
</FrameLayout>

However in run-time, there are top and bottom gaps, like this:

_0

I try again to use 180dp as layout height for the VerticalSeekBarWrapper. It looks better:

_1


So may I ask if you could publish official paddings (top/left/right/bottom) that the widget uses?

Thank you,


Edited

Updated sample XML layout. I was copying/pasting from my source, so the layout height was 180dp. Now updated to 150dp as my description.