Import Cn.bmob.v3.BmobUser;
Import Com.chencheng.utils.LoginStatus;
Import android.content.Intent;
Import Android.os.Bundle;
Import Android.support.v7.app.ActionBar;
Import android.support.v7.app.ActionBarActivity;
Import Android.util.Log;
Import Android.view.View;
Import Android.view.View.OnClickListener;
Import Android.widget.TextView;
public class Wodezhanghuactivity extends Actionbaractivity {
Private TextView Wodezhanghu_username;
Private TextView textView5;
@Override
protected void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Setcontentview (R.layout.activity_wodezhanghu);
Initactionbar ();
INIUI ();
}
private void Iniui () {
if (Loginstatus.getinstance (). Haslogin ()) {
Com.chencheng.model.User MyUser = Bmobuser.getcurrentuser (this, com.chencheng.model.User.class);
TextView wodezhanghu_username= (TextView) Findviewbyid (r.id.wodezhanghu_username);
Wodezhanghu_username.settext (Myuser.getusername ());
TextView textview5= (TextView) Findviewbyid (R.ID.TEXTVIEW5);
Btn_find_back_yanzheng= (Button) Findviewbyid (R.id.btn_find_back_yanzheng);
Btn_find_back_yanzheng.setonclicklistener (New Onclicklistener () {
@Override
public void OnClick (View v) {
Bmobuser.logout (Wodezhanghuactivity.this);
Loginstatus.getinstance (). Sethaslogin (false);
Intent intent=new Intent (wodezhanghuactivity.this,mainactivity.class);
Intent.putextra ("Flag", "Haslogin");
StartActivity (Intent);
}
});
LOG.E ("Myuser.getmobilephonenumber ()", Myuser.getmobilephonenumber () + "");
if (! "". Equals (Myuser.getmobilephonenumber ()) &&myuser.getmobilephonenumber ()!=null) {
Textview5.settext (Myuser.getmobilephonenumber ());
}else{
Textview5.settext ("none");
}
}else{
}
}
@Override
public Boolean onsupportnavigateup () {
Finish ();
return Super.onsupportnavigateup ();
}
private void Initactionbar () {
ActionBar ActionBar = Getsupportactionbar ();
Actionbar.setdisplayhomeasupenabled (TRUE);
Actionbar.setbackgrounddrawable (Getresources (). Getdrawable (
R.color.action_white));
Actionbar.settitle ("My Account");
}
}
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/97/wKiom1WiI_LgFVRrAAE3VQ3IGQQ084.jpg "title=" My account. png "alt=" wkiom1wii_lgfvrraae3vq3igqq084.jpg "/>
CC_ the My Account page of the American Group Project