gpt4 book ai didi

android - Spinner 和 WheelView 在一起

转载 作者:行者123 更新时间:2023-11-30 02:08:21 25 4
gpt4 key购买 nike

https://github.com/LukeDeighton/WheelView 一起使用时我无法选择微调器

它是单独工作的,但是,我所做的只是在 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" >

<Spinner
android:id="@+id/spinner2"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_below="@+id/tv" />

<com.lukedeighton.wheelview.WheelView
android:id="@+id/wheelview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/refresh"
app:emptyItemColor="@color/green_900"
app:repeatItems="true"
app:rotatableWheelDrawable="false"
app:selectionAngle="90.0"
app:selectionColor="@color/teal_900"
app:selectionPadding="4dp"
app:wheelColor="@color/grey_400"
app:wheelItemCount="14"
app:wheelItemRadius="41dp"
app:wheelPadding="13dp"
app:wheelPosition="bottom"
app:wheelRadius="276dp" />

</RelativeLayout>

最佳答案

这是因为相对布局变化如下:

      <Spinner
android:id="@+id/spinner2"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_below="@+id/tv" />

<com.lukedeighton.wheelview.WheelView
android:id="@+id/wheelview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/spinner2"
app:emptyItemColor="@color/green_900"
app:repeatItems="true"
app:rotatableWheelDrawable="false"
app:selectionAngle="90.0"
app:selectionColor="@color/teal_900"
app:selectionPadding="4dp"
app:wheelColor="@color/grey_400"
app:wheelItemCount="14"
app:wheelItemRadius="41dp"
app:wheelPadding="13dp"
app:wheelPosition="bottom"
app:wheelRadius="276dp" />

关于android - Spinner 和 WheelView 在一起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30434362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com