CC_ the My Account page of the American Group Project

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.