package com.casic.dcms.ui;

import android.view.View;
import android.widget.TextView;

import androidx.core.content.ContextCompat;

import com.casic.dcms.R;
import com.casic.dcms.base.BaseActivity;
import com.casic.dcms.utils.StringHelper;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;

import butterknife.BindView;

/**
 * @author : Pengxh
 * @time : 2021/4/14 15:22
 * @email : 290677893@qq.com
 **/
public class UserInfoActivity extends BaseActivity {

    @BindView(R.id.userTopLayout)
    QMUITopBarLayout userTopLayout;
    @BindView(R.id.userNameView)
    TextView userNameView;
    @BindView(R.id.userPhoneView)
    TextView userPhoneView;
    @BindView(R.id.userDeptView)
    TextView userDeptView;

    @Override
    public int initLayoutView() {
        return R.layout.activity_user;
    }

    @Override
    protected void setupTopBarLayout() {
        userTopLayout.setTitle("个人资料").setTextColor(ContextCompat.getColor(this, R.color.white));
        userTopLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.mainThemeColor));
        userTopLayout.addLeftImageButton(R.drawable.ic_left_white, 1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    public void initData() {
        userNameView.setText(StringHelper.getUserName());
        userPhoneView.setText(StringHelper.getUserPhone());
        userDeptView.setText(StringHelper.getUserDept());
    }

    @Override
    public void initEvent() {

    }
}
