wjc
2023-04-06 75a2f82f91d6568c0b3ea60ea93086e65f8a2e49
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package ezviz.ezopensdkcommon.configwifi;
 
import android.content.Intent;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
 
 
import ezviz.ezopensdkcommon.R;
import ezviz.ezopensdkcommon.common.RootActivity;
import ezviz.ezopensdkcommon.common.TitleBar;
 
public class AutoWifiPrepareStepOneActivity extends RootActivity implements OnClickListener {
 
    private Button btnNext;
    private String deviceType;
    private TextView topTip;
    private Button btnIntroduce;
    private ImageView imageBg;
    private AnimationDrawable aminBg;
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.auto_wifi_prepare_step_on);
        initTitleBar();
        initUI();
    }
 
    private void initTitleBar() {
        TitleBar mTitleBar = (TitleBar) findViewById(R.id.title_bar);
        mTitleBar.setTitle(R.string.auto_wifi_step_one_title);
        mTitleBar.addBackButton(new OnClickListener() {
 
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }
 
    @Override
    protected void onResume() {
        super.onResume();
    }
 
 
    private void initUI() {
        topTip = (TextView) findViewById(R.id.topTip);
        imageBg = (ImageView) findViewById(R.id.imageBg);
        btnNext = (Button) findViewById(R.id.btnNext);
        btnIntroduce = (Button) findViewById(R.id.btnIntroduce);
        btnNext.setOnClickListener(this);
        btnIntroduce.setOnClickListener(this);
 
        topTip.setText(getString(R.string.tip_heard_voice));
        imageBg.setImageResource(R.drawable.video_camera1_3);
        btnNext.setText(R.string.autowifi_heard_voice);
        btnIntroduce.setText(R.string.autowifi_not_heard_voice);
    }
 
    @Override
    public void onClick(View v) {
 
        Intent intent = null;
        int id = v.getId();
        if (id == R.id.btnNext){
            intent = new Intent(this, AutoWifiNetConfigActivity.class);
            intent.putExtras(getIntent());
            startActivity(intent);
        }else if(id == R.id.btnIntroduce){
            intent = new Intent(this, AutoWifiResetActivity.class);
            intent.putExtras(getIntent());
            startActivity(intent);
        }
//        switch (v.getId()) {
//            case R.id.btnNext:
//                intent = new Intent(this, AutoWifiNetConfigActivity.class);
//                intent.putExtras(getIntent());
//                startActivity(intent);
//                break;
//            case R.id.btnIntroduce:
//                intent = new Intent(this, AutoWifiResetActivity.class);
//                intent.putExtras(getIntent());
//                startActivity(intent);
//                break;
//            default:
//                break;
//        }
    }
 
    @Override
    protected void onDestroy() {
        if (aminBg != null) {
            aminBg.stop();
            aminBg = null;
        }
        super.onDestroy();
    }
 
 
}