Android TextView及布局Layout设置selector

TextView及布局Layout默认是没有pressfocus状态的,故直接设置selector无作用,需要开启focuspressfocusInTouchMode

textView.setClickable(true);
textView.setFocusable(true);
textView.setFocusableInTouchMode(true);
上一篇 Android的HorizontalScrollView控件使用注意
下一篇 Android Cannot call this method while RecyclerView is computing a layout or scrolling
目录
文章列表
1 Logstash使用日志记录时间替换@timestamp
Logstash使用日志记录时间替换@timestamp
2
布隆过滤器的方式解决缓存穿透问题
布隆过滤器的方式解决缓存穿透问题
3
JS定时器整理(执行一次、重复执行)
JS定时器整理(执行一次、重复执行)
4
Docker与Spring Boot的集成:docker-maven-plugin使用
Docker与Spring Boot的集成:docker-maven-plugin使用
5
Java认证与Shiro安全框架
Java认证与Shiro安全框架
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。