Sunday 15 July 2012

android - Is there anything that comes after onWindowFocusChanged in the life cycle? -


I'm using it to get the width and height of the imageView.

  @ Override public void on World Valve Focus Change (Boolean Hypocos) {Super. Windhoof focus switch (haphocus); ImageViewHeight = imageView.getHeight (); ImageViewWidth = imageView.getWidth (); // System.out.println ("ImageView - Width:" + imageViewWidth + "" + "Height:" + imageViewHeight); }  

The processing I am going to write depends on these variables so that everything can start here. Is that okay? I tried, create, create and resume and they all come on.

Thanks

As I've seen it is the last and when activity gets Focus, but according to API Docs it is not completely reliable. But in most cases it will work as well as be sure to use the variable hafs, as if a dialogue or some system level warning is displayed or your activism goes back, onWindowFocusChanged It will be a code which can give some unexpected problems in the form of Hasfocus false.


No comments:

Post a Comment