任何人都可以建议我任何与焦点有关的事件EditText吗?我的应用程序包含一个EditText,它接受一个URL.
现在我的问题是,用户将在字段中输入URL并进一步移动,没有任何点击事件,即当焦点将从中移动时EditText,它应检测输入的Url并转到服务器.
如果我使用Json Parsing得到答复,那么它会更方便.
我试图在一个Activity中强制打开Soft Keyboard并抓取输入的所有内容,因为我想自己处理输入,我没有EditText.目前我已经尝试了这个,但它不起作用.我想在mAnswerTextView下打开Soft Keyboardto(注意:它是TextView而不是EditText).
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// only will trigger it if no physical keyboard is open
mgr.showSoftInput(mAnswerTextView, InputMethodManager.SHOW_IMPLICIT);
Run Code Online (Sandbox Code Playgroud)