android onSaveInstanceState的使用方法(3)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:14 点击:次
super.onCreate(savedInstanceState);
// If an instance of this activity had previously stopped, we can
// get the original text it started with.
if(null != savedInstanceState)
{
int IntTest = savedInstanceState.getInt("IntTest");
String StrTest = savedInstanceState.getString("StrTest");
Log.e(TAG, "onCreate get the savedInstanceState+IntTest="+IntTest+"+StrTest="+StrTest);
}
setContentView(R.layout.main);
new Thread(new Runnable()
{
@Override
public void run() {
// TODO Auto-generated method stub
while(true)
{
if(!mThreadDisble)
{
Log.v(TAG, Boolean.toString(mThreadDisble));
try{
Thread.sleep(1000);
}
catch(Exception e)