GcsSloop / AndroidNote

安卓学习笔记
http://www.gcssloop.com/#blog
9.17k stars 2.14k forks source link

view.isShown() #3

Open GcsSloop opened 8 years ago

GcsSloop commented 8 years ago

用isShown()这个函数判断View是否显示比使用view.getVisibility() == View.VISIBLE要好。

isShown()会层层判断父View的状态设置,

view.getVisibility() == View.VISIBLE只会判断view当前的状态设置。

peacepassion commented 8 years ago

但是,这样效率就比较低了

GcsSloop commented 8 years ago

(´・_・`)