admin
2021-03-06 47dedd862b60ccecea34b5faba5c3cf64dd2b7d2
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.weikou.beibeivideo.ui.mine;
 
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout.LayoutParams;
import android.widget.Toast;
 
import com.androidquery.AQuery;
import com.lcjian.library.util.common.ClipboardUtil;
import com.lcjian.library.util.common.StringUtils;
import com.umeng.analytics.MobclickAgent;
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.ui.BaseActivity;
import com.weikou.beibeivideo.util.BeibeiConstant;
 
public class FeedBackActivity extends BaseActivity implements
        OnClickListener {
    private AQuery aQuery;
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_feedback);
        aQuery = new AQuery(this);
        initStatusBar();
        aQuery.id(R.id.tv_submit).clicked(this);
        aQuery.id(R.id.tv_top_bar_left).clicked(this);
 
        aQuery.id(R.id.tv_top_bar_middle).getTextView().setText("意见反馈");
 
        aQuery.id(R.id.et_content).getEditText().addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
 
            }
 
            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
 
            }
 
            @Override
            public void afterTextChanged(Editable s) {
                if (s != null) {
                    aQuery.id(R.id.tv_count).text(s.toString().length() + "/500");
                } else {
                    aQuery.id(R.id.tv_count).text("0/500");
                }
            }
        });
 
    }
 
    @Override
    public void onResume() {
        super.onResume();
        MobclickAgent.onPageStart("帮助中心");
    }
 
    @Override
    public void onPause() {
        super.onPause();
        MobclickAgent.onPageEnd("帮助中心");
    }
 
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_top_bar_left:// 返回按钮
                finish();
                break;
 
 
            case R.id.tv_submit:// 复制QQ号
                String content = aQuery.id(R.id.et_content).getText() + "";
                if (StringUtils.isEmpty(content)) {
                    Toast.makeText(this, "请填写意见", Toast.LENGTH_SHORT).show();
                    return;
                }
                Toast.makeText(this, "提交成功", Toast.LENGTH_SHORT).show();
                finish();
                break;
        }
    }
}