Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding background #9

Open
ghost opened this issue Aug 5, 2017 · 0 comments
Open

Adding background #9

ghost opened this issue Aug 5, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 5, 2017

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:

  • Set layout height of VerticalSeekBarWrapper to 150dp.
  • Make the background image's height 150dp.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants