admin
2021-05-13 4a8f1bec26519a25f073739534e653a4f7c9e11d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.tejia.lijin.app.ui.message;
 
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
 
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, getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"), id,null);
    }
 
    @Override
    protected void onDestroy() {
        super.onDestroy();
        OkHttpUtils.getInstance().cancelTag(tag);
    }
}