导航菜单

页面标题

页面副标题

爱心e站 v1.0.0 - CochlearSearchActivity.java 源代码

正在查看: 爱心e站 v1.0.0 应用的 CochlearSearchActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.newheyd.JZKFcanjiren.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.iflytek.cloud.SpeechConstant;
import com.newheyd.JZKFcanjiren.BaseActivity;
import com.newheyd.JZKFcanjiren.Bean.Dict;
import com.newheyd.JZKFcanjiren.Bean.DictCacheList;
import com.newheyd.JZKFcanjiren.R;
import com.newheyd.JZKFcanjiren.Utils.StastisticUtil;
import com.newheyd.JZKFcanjiren.Utils.locationUtil.LocationAddrUtil;
import com.newheyd.JZKFcanjiren.View.DictSingleSelectDialog;
import com.newheyd.JZKFcanjiren.View.TitleView;
import com.newheyd.JZKFcanjiren.model.BaseResult;
import com.newheyd.JZKFcanjiren.net.NewHYTask;
import com.newheyd.JZKFcanjiren.net.RequestServiceList;
import java.util.ArrayList;
import java.util.HashMap;

public class CochlearSearchActivity extends BaseActivity implements View.OnClickListener {
    private TitleView mTitleView;
    private TextView mTvClear;
    private TextView mTvConfirm;
    private TextView mTvStatus;
    private ArrayList<Dict> mStatusDictList = new ArrayList<>();
    private HashMap<String, String> params = new HashMap<>();

    static class AnonymousClass2 {
        static final int[] $SwitchMap$com$newheyd$JZKFcanjiren$net$RequestServiceList = new int[RequestServiceList.values().length];
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_cochlear_search);
        super.onCreate(savedInstanceState);
        this.mStatusDictList = DictCacheList.getStatus();
        goStatistics();
    }

    public void goStatistics() {
        HashMap<String, String> map = LocationAddrUtil.getInstance().getLocationParam(this.mContext);
        StastisticUtil.getInstance().onEvent(this.mContext, "CochlearSearchActivity", map);
    }

    @Override
    public void onResponseBefore(NewHYTask task) {
    }

    @Override
    public void onResponseAfter(NewHYTask task) {
    }

    @Override
    public void onResponseSuccessful(NewHYTask task, BaseResult object) {
        int i = AnonymousClass2.$SwitchMap$com$newheyd$JZKFcanjiren$net$RequestServiceList[task.getService().ordinal()];
    }

    @Override
    public void onResponseError(NewHYTask task, BaseResult object) {
        int i = AnonymousClass2.$SwitchMap$com$newheyd$JZKFcanjiren$net$RequestServiceList[task.getService().ordinal()];
    }

    @Override
    public void onServerError(NewHYTask task, int failedType) {
        int i = AnonymousClass2.$SwitchMap$com$newheyd$JZKFcanjiren$net$RequestServiceList[task.getService().ordinal()];
    }

    @Override
    public void getExtraParam() {
    }

    @Override
    public void initViews() {
        this.mTitleView = (TitleView) findViewById(R.id.titleview);
        this.mTvStatus = (TextView) findViewById(R.id.tv_status);
        this.mTvClear = (TextView) findViewById(R.id.tv_clear);
        this.mTvConfirm = (TextView) findViewById(R.id.tv_confirm);
    }

    @Override
    public void setListener() {
        this.mTitleView.setOnTitleClik(new TitleView.BackListenner() {
            @Override
            public void BackSet() {
                CochlearSearchActivity.this.finish();
            }
        }, null);
        this.mTvStatus.setOnClickListener(this);
        this.mTvStatus.setTag("");
        this.mTvClear.setOnClickListener(this);
        this.mTvConfirm.setOnClickListener(this);
    }

    public void goSearch() {
        if (!TextUtils.isEmpty(this.mTvStatus.getTag().toString())) {
            this.params.put("status", this.mTvStatus.getTag().toString());
        }
        Intent intent = new Intent();
        intent.putExtra(SpeechConstant.PARAMS, this.params);
        setResult(-1, intent);
        finish();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_status:
                DictSingleSelectDialog.getInstance().showDialog(this.mContext, (TextView) v, "选择进度", this.mStatusDictList);
                break;
            case R.id.tv_clear:
                this.mTvStatus.setTag("");
                this.mTvStatus.setText("请选择进度");
                this.params.clear();
                break;
            case R.id.tv_confirm:
                goSearch();
                break;
        }
    }
}