EditText自定义监听方法实现onFocusChanged的监听

<div class="line number1 index0 alt2" style="list-style: none; line-height: 15.4px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; box-sizing: content-box !important; margin: 0px !important; padding: 0px 1em !important; border: 0px !important; outline: 0px !important; border-radius: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"><span style="color: rgb(0, 102, 153);"><span style="white-space: nowrap;"><span style="font-weight: bold;"><span style="line-height: 15.4px;">    有一定开发经验的程序员知道,EditText控件位于一个Activity的布局最上方时,当<span style="line-height: 15.4px;"><span style="line-height: 15.4px;">EditText实现onFocusChanged的监听方法时,</span></span></span>
</span></span></span></div><div class="line number1 index0 alt2" style="list-style: none; line-height: 15.4px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; box-sizing: content-box !important; margin: 0px !important; padding: 0px 1em !important; border: 0px !important; outline: 0px !important; border-radius: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"><span style="color: rgb(0, 102, 153);"><span style="white-space: nowrap;"><span style="font-weight: bold;"><span style="line-height: 15.4px;"><span style="line-height: 15.4px;"><span style="line-height: 15.4px;">程序运行的时候,输入光标会自动定位到EditText控件中,这时会触发<span style="line-height: 15.4px;"><span style="line-height: 15.4px;"><span style="line-height: 15.4px;"><span style="line-height: 15.4px;">onFocusChanged监听,执行里面的方法。这会导致一些麻烦</span></span></span></span></span></span></span></span></span></span></div><div class="line number1 index0 alt2" style="list-style: none; line-height: 15.4px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; box-sizing: content-box !important; margin: 0px !important; padding: 0px 1em !important; border: 0px !important; outline: 0px !important; border-radius: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: a
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值