package com.smartdot.cgt.activity; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.Window; import android.widget.TextView; import com.smartdot.cgt.R; import com.smartdot.cgt.model.UserModel; import com.smartdot.cgt.util.ApplicationMain; import com.smartdot.cgt.view.FootBar; import com.smartdot.cgt.view.TitleBar; /** * Created by W530 on 2019/9/25. */ @SuppressLint("NewApi") public class PersonalActivity extends Activity { TextView txtname,txtphone,txtdepartment; private TitleBar titlebar; private FootBar footbar; @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); MyApplication.getInstance().addActivity(this); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.userinfo); titlebar = (TitleBar) this.findViewById(R.id.titlebar); titlebar.setTitleText("个人资料"); footbar = (FootBar) this.findViewById(R.id.footbar); footbar.setChoose(4); txtname = (TextView) findViewById(R.id.name); txtphone = (TextView) findViewById(R.id.phone); txtdepartment = (TextView) findViewById(R.id.department); UserModel userModel = ApplicationMain.getInstance().getUserModel(); txtname.setText(userModel.getUserName()); txtphone.setText(userModel.getPhone()); txtdepartment.setText(userModel.getDeptName()); } }