摘要:
Android的EditText通过setOnEditorActionListener给文本编辑框设置监听事件,但是在其处理方法onEditorAction中的逻辑在每次回车后都触发了两次,这是因为在键盘回车的ACTION_UP和ACTION_DOWN时都会触发这个方法。下面的方法可以防止执行两次。 阅读全文
posted @ 2022-08-18 15:12
明天星期五啦
阅读(286)
评论(0)
推荐(0)
摘要:
1 public static void hideKeyboard(View view){ 2 InputMethodManager imm = (InputMethodManager) view.getContext() 3 .getSystemService(Context.INPUT_METH 阅读全文
posted @ 2022-08-18 10:54
明天星期五啦
阅读(130)
评论(0)
推荐(0)
摘要:
1 public static void saveDataToPrivateFile(Context context, String data, int mode, String fileName) { 2 FileOutputStream fileOutputStream = null; 3 Bu 阅读全文
posted @ 2022-08-18 09:59
明天星期五啦
阅读(275)
评论(0)
推荐(0)

浙公网安备 33010602011771号