diff --git a/ChangeLog.md b/ChangeLog.md
index aee40785..e7efd915 100755
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,6 +1,7 @@
### v1.3.1 - 2016.12.18
支持设置选中项分割线的宽比例、透明度、粗度;
修复小数选择器设置默认选择项可能无效的bug;
+添加中国大陆车牌号码选择器;
### v1.3.0 - 2016.12.15
支持设置选择器主体背景颜色;
所有选择器支持滑动实时监听;
diff --git a/app/src/main/java/cn/qqtheme/androidpicker/NestActivity.java b/app/src/main/java/cn/qqtheme/androidpicker/NestActivity.java
index b5ac15cc..eaca6926 100755
--- a/app/src/main/java/cn/qqtheme/androidpicker/NestActivity.java
+++ b/app/src/main/java/cn/qqtheme/androidpicker/NestActivity.java
@@ -21,6 +21,7 @@
* Builder:Android Studio
*/
public class NestActivity extends Activity {
+ private CarNumberPicker picker;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -30,7 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
final TextView textView = (TextView) findViewById(R.id.wheelview_tips);
WheelView wheelView = (WheelView) findViewById(R.id.wheelview_single);
- wheelView.setItems(new String[]{ "少数民族", "贵州穿青人", "不在56个少数民族之列", "第57个民族"});
+ wheelView.setItems(new String[]{"少数民族", "贵州穿青人", "不在56个少数民族之列", "第57个民族"}, 1);
wheelView.setTextColor(0xFFFF00FF);
WheelView.LineConfig config = new WheelView.LineConfig();
config.setColor(0xFFFF00FF);//线颜色
@@ -45,7 +46,7 @@ public void onSelected(boolean isUserScroll, int index, String item) {
}
});
- final CarNumberPicker picker = new CarNumberPicker(this);
+ picker = new CarNumberPicker(this);
picker.setLineConfig(new WheelView.LineConfig(0));
picker.setOffset(3);
picker.setOnWheelListener(new CarNumberPicker.OnWheelListener() {
@@ -67,4 +68,8 @@ public void onBack(View view) {
finish();
}
+ public void onCarNumber(View view) {
+ picker.show();
+ }
+
}
diff --git a/app/src/main/res/layout/activity_nest.xml b/app/src/main/res/layout/activity_nest.xml
index cec45176..bdfddfa4 100755
--- a/app/src/main/res/layout/activity_nest.xml
+++ b/app/src/main/res/layout/activity_nest.xml
@@ -31,6 +31,14 @@
android:gravity="center_vertical"
android:text="内嵌选择器"/>
+
+