手记

android activity监听加载完毕事件


很多人想在某个activity加载完所有布局文件或数据时候,自动进行下一步操作,但是很多时候都不能成功!总是抛这个错误那个错误,说activity尚未加载完毕,android 提供了个很好的方法为我们解决这个问题,通过重写  public void onWindowFocusChanged(boolean hasFocus) 方法

public void onWindowFocusChanged(boolean hasFocus)

{

    if (hasFocus) {

    }

}

原文链接:http://www.apkbus.com/blog-853311-61832.html

0人推荐
随时随地看视频
慕课网APP