1

I'm using this library to create a circular list. I want put items exactly in center of screen for all phones with different screen sizes.
How can i do that in a short way ?

We can use app:wheelRadius="350dp" to change radius of out circle ( wheel ). can i set a dynamic value for this to put elements in center of screen for all phones ?

XML

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.lukedeighton.wheelview.WheelView
        android:id="@+id/wheelview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:repeatItems="true"
        app:rotatableWheelDrawable="false"
        app:selectionAngle="90.0"
        app:wheelItemCount="14"
        app:wheelItemRadius="25dp"
        app:wheelOffsetY="100dp"
        app:wheelPadding="13dp"
        app:wheelPosition="bottom"
        app:wheelRadius="350dp"/>
</RelativeLayout>

We have to parameter here. wheelOffsetY and wheelRadius that control wheel postition

Arash Hatami
  • 5,297
  • 5
  • 39
  • 59

0 Answers0