mohammed_sajid
mohammed_sajid

Reputation: 455

Seekbar rotated to 270 does not fill the seekbar to match parent

I have been trying to get my seekbar to fit the UI completely to match parent for width and height to my guidelines. However when using rotation set to 270 or -90 it seems to not want to fill completely.

This is a picture of what it looks like right now: [![image1][1]][1]

So far this is my mainactivity xml for the seekbar:

<SeekBar
        android:id="@+id/seekBar"
        style="@style/SeekBarStyle"
        android:layout_height="0dp"
        android:layout_width="0dp"
        android:max="80"
        android:progress="0"
        android:rotation="270"
        android:visibility="visible"
        app:layout_constraintBottom_toTopOf="@+id/lineBottom"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/lineUpper" />

And this is its styling file, which I have tried to remove the height in it but this makes it super tiny:

    <!-- Background progress -->
    <item>
        <shape android:shape="rectangle">
            <size android:height="150dp"/>
            <solid android:color="@color/dark_grey"/>
            <corners android:radius="8dp"/>
        </shape>
    </item>

    <!-- Actual progress -->
    <item android:id="@android:id/progress">
        <clip>
            <shape android:shape="rectangle">
                <size android:height="150dp"/>
                <solid android:color="@android:color/holo_blue_light"/>
                <corners android:radius="8dp"/>
            </shape>
        </clip>
    </item>
</layer-list>```


  [1]: https://i.sstatic.net/0k1bvoQC.png

Upvotes: 0

Views: 30

Answers (0)

Related Questions