Android???????????????2
???????????? ???????[ 2013/12/20 11:31:07 ] ????????
???????Activity????????????????
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/splash">
</LinearLayout>
|
?????????????????????Splash???????????
??????????????????AppController???????????????Activity???????????????????????????????????????AppController.processEvent???????????????????????????????????????μ???????????AppController????Message?????????AppController?????Handler????????????????????
package com.bjcic.wkj;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
public class AppController extends Handler {
public AppController(AppModel appModel) {
super();
this.appModel = appModel;
}
/**
* Activity?л???????????????????????????????????????AppController???????????
* @param event
*/
public void processEvent(AppEvent event) {
switch (event.getEventId()) {
case AppEvent.EVE_SPLASH_END: // ??Splash?????????????
showMainActivity((Activity)event.getContext()?? event.getParams());
break;
default:
break;
}
}
/**
* ?????????????????????????????????AppController???????????
*/
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
}
/**
* ???Splash??沢???????????
* @param activity
* @param params
*/
private void showMainActivity(Activity activity?? Bundle params) {
Log.d("wkj"?? "activity=" + activity + "; c=" + MainActivity.class + "!");
Intent intent = new Intent(activity?? MainActivity.class);
activity.startActivity(intent);
activity.finish();
}
private AppModel appModel = null;
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????????????TDD??????????????????Python???????????????????????????????Ч????????????????????????????????????????????Щ?????????????????????????TDD????????????ú???δ????????????? Test-driven development???????????????????????????????????????TDD(3)????????????TDD(2)????????????TDD(1)Android???????????????3Android???????????????1Android????????????????????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????