PickViewFor2D,是在NumberPickerView的代码上添加了部分属性
1、可以自定义item高度
2、可以设置选中的item的背景颜色
xml使用方式如下:
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/picker"
android:layout_width="wrap_content"
android:layout_height="240dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:background="#ee9922"
android:contentDescription="test_number_picker_view"
app:npv_ItemPaddingHorizontal="5dp"
app:npv_ItemPaddingVertical="5dp"
app:npv_ShowCount="5"
app:npv_TextSizeNormal="16sp"
app:npv_TextColorNormal="@color/colorWhite"
app:npv_TextColorSelected="@color/colorPrimary"
app:npv_TextSizeSelected="20sp"
app:npv_ItemHeight="55dip"
app:npv_CenterItemBgColor="@color/colorAccent"
app:npv_WrapSelectorWheel="true"/>
<br>具体详细使用请参照NumberPickerView
链接地址:https://github.com/Carbs0126/NumberPickerView
本备份个人爱好,如果对原版有侵犯,请联系我邮箱bxfx111@163.com,我会做处理。