我按照这个stackoverflow链接自动刷新每5秒刷新一次活动的活动我想只在创建时刷新一次活动而不是每5秒我要做什么?
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.mHandler = new Handler();
this.mHandler.postDelayed(m_Runnable,5000);
}//onCreate
private final Runnable m_Runnable = new Runnable()
{
public void run()
{
Toast.makeText(refresh.this,"in runnable",Toast.LENGTH_SHORT).show();
refresh.this.mHandler.postDelayed(m_Runnable, 5000);
}
};//runnable