溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

cc_美團(tuán)項(xiàng)目之我的賬戶頁(yè)面實(shí)現(xiàn)

發(fā)布時(shí)間:2020-07-19 11:42:01 來源:網(wǎng)絡(luò) 閱讀:272 作者:愚人cc 欄目:移動(dòng)開發(fā)


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("無");

}

}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("我的賬戶");

}

}



cc_美團(tuán)項(xiàng)目之我的賬戶頁(yè)面實(shí)現(xiàn)

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI