beg*_*ass 5 events android click launch android-edittext
我的android活动中有这个editText
<EditText
android:id="@+id/payment_expiration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/payment_expiration_label"
android:layout_centerHorizontal="true"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:clickable="true"
android:onClick="update_expiration_date"
android:editable="false"
android:layout_marginTop="-4dp"
android:cursorVisible="false"
android:maxLength="7"
android:padding="10dp"
android:textSize="13dp" />
Run Code Online (Sandbox Code Playgroud)
正如您在用户点击时所看到的那样
我调用这个方法来启动datePickerDialog:
public void update_expiration_date(View v){
Log.i("","cliqué");
picker.show();
can_update_expiration_date = true;
}
Run Code Online (Sandbox Code Playgroud)
我遇到的问题是:在我第一次打开此活动时,用户必须单击两次才能启动对话框
但在那之后,只需点击一下即可
我该如何解决这个问题
| 归档时间: |
|
| 查看次数: |
5293 次 |
| 最近记录: |