简体   繁体   中英

Radial layout of Seekbars (Views) in Android Studio

hi does anyone know how to layout multiple seekbars around a single point - like a radial pattern? also how to make them have varying lengths? (please see image 1 ). if it is easier please assume an even angle between seekbars.

iv messed around with android studio loads but cant get anything close. eventually i want to do this with java so i can add new bars on the fly but for now i will settle for just an xml solution.

thanks so much.

sketch showing array of seekbars

First you judiciously arrange all you seekbar's at some position in RelativeLayout (i prefer relative layout, you can use other as well). Then set rotation property of seekbar's with angle values that satisfies your scenario.

<SeekBar
        android:id="@+id/seekBar1"
        android:layout_width="300dp"
        android:rotation="60"
/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM