package com.tejia.lijin.app.ui.message;
|
|
import android.os.Bundle;
|
import android.view.View;
|
import android.widget.TextView;
|
|
import com.tejia.lijin.app.ShoppingApplication;
|
import com.tejia.lijin.app.util.user.UserUtil;
|
import com.wpc.library.okhttp.OkHttpUtils;
|
import com.wpc.library.util.common.DateUtils;
|
import com.tejia.lijin.app.R;
|
import com.tejia.lijin.app.ShoppingApi;
|
import com.tejia.lijin.app.entity.Message;
|
import com.tejia.lijin.app.ui.BaseActivity;
|
import com.tejia.lijin.app.util.TopStatusSettings;
|
|
/**
|
* Created by weikou2015 on 2018/1/18.
|
*/
|
|
public class AppMailDetailActivity extends BaseActivity implements View.OnClickListener {
|
TextView tv_left, tv_middle;
|
TextView tv_time;
|
TextView tv_title;
|
TextView tv_detail;
|
|
String tag="customer/openAccountMessage";
|
|
@Override
|
protected void onCreate(Bundle savedInstanceState) {
|
super.onCreate(savedInstanceState);
|
setContentView(R.layout.activity_app_mail_detail);
|
TopStatusSettings.setStatusViewAndDeepColor(this);
|
tv_left = findViewById(R.id.tv_top_bar_left);
|
tv_middle = findViewById(R.id.tv_top_bar_middle);
|
tv_time = findViewById(R.id.tv_time);
|
tv_title = findViewById(R.id.tv_title);
|
tv_detail = findViewById(R.id.tv_detail);
|
tv_middle.setText("信息详情");
|
Message info = (Message) getIntent().getSerializableExtra("msg");
|
openMsg(info.getId());
|
tv_time.setText(DateUtils.getTimeToString(Long.parseLong(info.getCreateTime())));
|
tv_title.setText(info.getTitle());
|
tv_detail.setText(info.getContent());
|
tv_left.setOnClickListener(this);
|
}
|
|
@Override
|
public void onClick(View view) {
|
switch (view.getId()) {
|
case R.id.tv_top_bar_left:
|
finish();
|
break;
|
}
|
}
|
|
private void openMsg(String id) {
|
ShoppingApi.openMessage(AppMailDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), id,null);
|
}
|
|
@Override
|
protected void onDestroy() {
|
super.onDestroy();
|
OkHttpUtils.getInstance().cancelTag(tag);
|
}
|
}
|