【发布时间】:2012-10-01 17:46:22
【问题描述】:
我在 sof 或 google 上找不到任何东西!所以我需要你的帮助! 我喜欢点击我的(空)微调器,所以我会显示一个日期或时间选择器对话框。我找不到任何处理方法。这些是我现在的 sn-ps。:
只有我的两个对象:
DatePickerDialog dDialog = new DatePickerDialog(this, (OnDateSetListener) this, 2012, 3, 3);
Spinner dSpinner = (Spinner) findViewById(R.id.spinner1);
xml:
<Spinner
android:id="@+id/spinner1"
android:spinnerMode="dialog"
android:prompt="@string/hint_date"
android:layout_marginTop="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
也许你知道如何处理它。我想通过 onClick 选择一个日期,调用选择器(微调器有什么不可能的?!)我也尝试了 onclicklisteners。
【问题讨论】:
-
我非常了解这个链接.. 但微调器不可能:|我试过了!
-
我不确定我是否理解。为什么你还有一个空的
Spinner?所以你只希望你的Spinner像Button一样运行,显示DatePickerDialog?
标签: android dialog datepicker spinner android-spinner