正在查看: 爱心e站 v1.0.0 应用的 PolicyQueryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 爱心e站 v1.0.0 应用的 PolicyQueryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.newheyd.JZKFcanjiren.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.newheyd.JZKFcanjiren.BaseActivity;
import com.newheyd.JZKFcanjiren.Bean.DictionaryBean;
import com.newheyd.JZKFcanjiren.R;
import com.newheyd.JZKFcanjiren.Utils.DataUtil;
import com.newheyd.JZKFcanjiren.Utils.StastisticUtil;
import com.newheyd.JZKFcanjiren.Utils.locationUtil.LocationAddrUtil;
import com.newheyd.JZKFcanjiren.View.DateTimePickDialog;
import com.newheyd.JZKFcanjiren.View.Dialog.MyDialog;
import com.newheyd.JZKFcanjiren.View.TitleView;
import com.newheyd.JZKFcanjiren.model.BaseResult;
import com.newheyd.JZKFcanjiren.net.NewHYTask;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
public class PolicyQueryActivity extends BaseActivity implements View.OnClickListener {
private List<DictionaryBean> dataList;
private EditText et_cid;
private EditText et_name;
private TextView et_start_date;
private TextView tv_end_date;
private String[] query = new String[6];
private String type = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_policy_query);
super.onCreate(savedInstanceState);
this.type = getIntent().getStringExtra("type");
goStatistics();
}
public void goStatistics() {
HashMap<String, String> map = LocationAddrUtil.getInstance().getLocationParam(this.mContext);
StastisticUtil.getInstance().onEvent(this.mContext, "PolicyQueryActivity", map);
}
@Override
public void onResponseBefore(NewHYTask task) {
}
@Override
public void onResponseAfter(NewHYTask task) {
}
@Override
public void onResponseSuccessful(NewHYTask task, BaseResult object) {
}
@Override
public void onResponseError(NewHYTask task, BaseResult object) {
}
@Override
public void onServerError(NewHYTask task, int failedType) {
}
@Override
public void initViews() {
TitleView tv_title = (TitleView) findViewById(R.id.tv_title);
tv_title.setOnTitleClik(null, null);
this.et_name = (EditText) findViewById(R.id.et_name);
this.et_cid = (EditText) findViewById(R.id.et_cid);
this.et_start_date = (TextView) findViewById(R.id.et_start_date);
this.tv_end_date = (TextView) findViewById(R.id.tv_end_date);
}
@Override
public void setListener() {
this.et_start_date.setOnClickListener(this);
this.tv_end_date.setOnClickListener(this);
}
public void clearDate(View veiw) {
this.et_name.setText("");
this.et_cid.setText("");
this.et_start_date.setText("");
this.tv_end_date.setText("");
this.query = new String[6];
}
public void searchDate(View view) {
this.query[0] = this.et_name.getText().toString();
Intent intent = new Intent();
intent.putExtra("query", this.query);
if ("1".equals(this.type)) {
intent.setClass(this.mContext, ActivityPolicyAdmin.class);
startActivity(intent);
finish();
} else {
setResult(-1, intent);
finish();
}
}
public void showChoiceDialog(final int id, String title, String[] str) {
MyDialog myDialog = new MyDialog(this, str, title, "取消", false);
myDialog.setOnDiaLogListener(new MyDialog.OnDialogListenerD() {
@Override
public void dialogDanxuanListener(View customView, String select, int which) {
((TextView) PolicyQueryActivity.this.findViewById(id)).setText(select);
int i = id;
}
}, new MyDialog.OnDialogListenerN() {
@Override
public void dialogNegativeListener(View customView, DialogInterface dialogInterface, int which) {
((TextView) PolicyQueryActivity.this.findViewById(id)).setText("");
int i = id;
dialogInterface.dismiss();
}
});
myDialog.showDialog();
}
@Override
public void onClick(View v) {
DateTimePickDialog dateTimePicKDialog = null;
try {
DateTimePickDialog dateTimePicKDialog2 = new DateTimePickDialog(this, DataUtil.longToString(System.currentTimeMillis(), "yyyy年MM月dd日"));
dateTimePicKDialog = dateTimePicKDialog2;
} catch (ParseException e) {
e.printStackTrace();
}
switch (v.getId()) {
case R.id.tv_end_date:
dateTimePicKDialog.dateTimePicKDialog(this.tv_end_date);
break;
case R.id.et_start_date:
dateTimePicKDialog.dateTimePicKDialog(this.et_start_date);
break;
}
}
}