/** Called when the activity is first created. */
private LinearLayout mLoadingLayout;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
// TODO Auto-generated method stub
super.handleMessage(msg);
if (msg.what==1){
mLoadingLayout = (LinearLayout)findViewById(R.id.fullscreen_loading_style);
mLoadingLayout.setVisibility(View.GONE);
LinearLayout mMain = (LinearLayout)findViewById(R.id.main_info);
mMain.setVisibility(View.VISIBLE);
}
}
};
new Thread(){
public void run(){
for (int i=0;i<1000;i++){
System.out.print(i+"");
}
Message msg = handler.obtainMessage(1,"flash");
handler.sendMessage(msg);
}
}.start();
}
}
运行的效果为:

希望本文所述对大家的Android程序设计有所帮助。