Skip to content

Instantly share code, notes, and snippets.

@r17171709
Created June 6, 2015 00:06
Show Gist options
  • Save r17171709/d40d916282535f37adac to your computer and use it in GitHub Desktop.
Save r17171709/d40d916282535f37adac to your computer and use it in GitHub Desktop.
// 循环检测activity是否初始化完毕
starnum_seekbar.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
if (null != getWindow().getDecorView().getWindowToken()) {
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View undoView = inflater.inflate(
R.layout.view_seekbarhint2, null);
starnum_seekbar.showPopup(undoView);
starnum_seekbar.setProgress(1);
handler.removeCallbacks(this);
} else {
handler.postDelayed(this, 5);
}
}
}, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment