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.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);
|
/*
|
* 计算状态栏高度并设置
|
*/
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
int result = 0;
|
int resourceId = getResources().getIdentifier("status_bar_height",
|
"dimen", "android");
|
if (resourceId > 0) {
|
result = getResources().getDimensionPixelSize(resourceId);
|
}
|
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
|
result);
|
findViewById(R.id.v_status_bar).setLayoutParams(params);
|
} else {
|
findViewById(R.id.v_status_bar).setVisibility(View.GONE);
|
}
|
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号
|
Toast.makeText(this, "提交成功", Toast.LENGTH_SHORT).show();
|
finish();
|
break;
|
}
|
}
|
}
|