安卓 怎么判断哪个edittext获得了焦点

2025-02-28 00:03:15
推荐回答(1个)
回答1:

boolean view.hasFocus() Returns true if this view has focus iteself, or is the ancestor of the view that has focus. if(editext.hasFocus()) { //to do }