Created
December 12, 2014 11:43
-
-
Save omegasoft7/c20f8e9b7d80a4101f03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// //show after fully load of layers | |
ViewTreeObserver vto = myview.getViewTreeObserver(); | |
vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { | |
@SuppressLint("NewApi") | |
@Override | |
public void onGlobalLayout() { | |
//Do needs after load interface here | |
ViewTreeObserver obs = myview.getViewTreeObserver(); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | |
obs.removeOnGlobalLayoutListener(this); | |
} else { | |
obs.removeGlobalOnLayoutListener(this); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment