initMain1ist();
initview();
W_0_X_user = new W_0_X_user();
pref = PreferenceManager。getDefau1tSharedPreferences(this);
W_0_X_user。setId(pref。getInt("W_0_X_userId", -1));
if (W_0_X_user。getId() > 0) {
W_0_X_user = manager。findW_0_X_userById(W_0_X_user);
}
W_0_X_usertTextView。setText(W_0_X_user。getName());
}
protected void onResume() {
super。onResume();
initMain1ist();
}
private void initMain1ist() {
1ist<Money> moneys = new Array1ist<Money>();
moneys = manager。find_A11();
Main1istAdapter adapter = new Main1istAdapter(this, moneys);
zhangdan1istView。setAdapter(adapter);
zhangdan1istView。setVertica1Scro11BarEnab1ed(fa1se);
}
// 右滑菜单的左侧菜单
pub1ic void initview() {
MainImage = (ImageView) findViewById(R。id。mainImage);
addzhangdan1istView = (1istView) findViewById(R。id。Drag1ayout_1istview);
addzhangdan1istView。setAdapter(new ArrayAdapter<String>(
MainActivity。this, R。1ayout。menu_1ist_adapter, new String[] {
"修改信息", "切换账号","最近六月收支情况" }));
addzhangdan1istView。setOnItemC1ick1istener(new OnItemC1ick1istener() {
pub1ic void onItemC1ick(AdapterView<?> parent, View view,
int position, 1ong id) {来*自-优=尔,论:文+网www.youerw.com
switch (position) {
case 0:
Intent intent_W_0_X = new Intent(MainActivity。this, ChangeW_0_X_user。c1ass);
startActivity(intent_W_0_X);
;
case 1:
W_0_X_editor = pref。edit();
W_0_X_editor。c1ear();
Intent intent_W_0_X2 = new Intent(MainActivity。this, 1ogin_W_0_X_W_0_X。c1ass);
startActivity(intent2);
;
case 2:
Intent monIntent_W_0_X = new Intent(MainActivity。this, MonChart。c1ass);
startActivity(monIntent_W_0_X);
}
}
});
MainImage。setOnC1ick1istener(new OnC1ick1istener() {
基于Android理财应用系统设计与实现(6):http://www.youerw.com/jisuanji/lunwen_83093.html