@Override public void initData() { super.initData(); new Thread( new Runnable() { @Override public void run() { mindder = DataSupport.find(Minder.class, minderId); mHandler.sendEmptyMessage(1); } }) .start(); }
@Override protected void initData() { loadingDialog.setOnKeyListener( new OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (loadingDialog != null) loadingDialog.cancel(); } return true; } }); Intent intent = getIntent(); titleStr = intent.getStringExtra(LIST_TITLE); id = intent.getStringExtra(LIST_ID); dataPool = new DataAsyncTaskPool(); jsonHelper = new ModelHelper(CourseListActivity.this); dataServiceHelper = new DataServiceHelper() { @Override public void preExecute() {} @Override public void postExecute(String TAG, Object result, Object... params) { Log.v("tag", "updateView"); updateView(result, (Integer) params[0]); } @Override public Object doInBackground(Object... params) { // try { // Thread.sleep(1000); // } catch (InterruptedException e) { // e.printStackTrace(); // } // return // jsonHelper.parseJson(LibIOUtil.convertStreamToStr(getResources().openRawResource(R.raw.course_list_activity_json))); return null; } }; super.initData(); }
@Override protected void initData() { dataPool = new DataAsyncTaskPool(); jsonHelper = new ModelHelper(SplashScreenActivity.this); dataServiceHelper = new DataServiceHelper() { @Override public void preExecute() {} @Override public void postExecute(String TAG, Object result, Object... params) { updateView(result); } @Override public Object doInBackground(Object... params) { return null; } }; super.initData(); }
@Override protected void initData() { super.initData(); }