在使用https://github.com/LukeDeighton/WheelView
时,我无法选择微调器它单独工作但是,我所做的只是在xml和set adapter中添加了spinner仍然无法正常工作请帮忙。
<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>
答案 0 :(得分:1)
由于相对布局的变化如下:
<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" />