wxr
2022-11-24 2af932533ef851bf983385244e9912976dbd4daa
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
package com.mm.android.deviceaddmodule.p_softap.oversea;
 
 
import android.os.Bundle;
import android.view.View;
 
import com.mm.android.deviceaddmodule.R;
import com.mm.android.deviceaddmodule.base.BaseTipFragment;
import com.mm.android.deviceaddmodule.event.DeviceAddEvent;
import com.mm.android.deviceaddmodule.helper.DeviceAddHelper;
import com.mm.android.deviceaddmodule.helper.DeviceAddImageLoaderHelper;
import com.mm.android.deviceaddmodule.helper.PageNavigationHelper;
import com.mm.android.deviceaddmodule.mobilecommon.AppConsume.ProviderManager;
import com.mm.android.deviceaddmodule.mobilecommon.entity.deviceadd.DeviceIntroductionInfo;
import com.mm.android.deviceaddmodule.model.DeviceAddModel;
import com.nostra13.universalimageloader.core.ImageLoader;
 
import org.greenrobot.eventbus.EventBus;
 
 
/**
 
 * 软Ap 设备连接wifi判断页,用户手动判断设备是否已连接上wifi(国外乐橙)
 */
public class SoftApResultFragment extends BaseTipFragment implements View.OnClickListener {
    public static SoftApResultFragment newInstance() {
        SoftApResultFragment fragment = new SoftApResultFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }
 
 
    @Override
    protected void nextAction() {
        if(DeviceAddModel.newInstance().getDeviceInfoCache().isWifiOfflineMode()){
            EventBus.getDefault().post(new DeviceAddEvent(DeviceAddEvent.DESTROY_ACTION));
            ProviderManager.getDeviceAddCustomProvider().goHomePage(getActivity());
        }else {
            PageNavigationHelper.gotoDeviceBindPage(this);
        }
    }
 
    @Override
    protected void helpAction() {
 
    }
 
    @Override
    protected void init() {
        initView(mView);
        initData();
    }
 
    protected void initView(View view){
        super.initView(view);
        tipImageMatch();
        mTipImg.setImageResource(R.drawable.adddevice_netsetting_connectrouter);
        mTipTxt.setText(R.string.add_device_softap_dev_connect_tip);
        mConfirmCheck.setText(R.string.add_device_softap_dev_connect_check_tip);
        mConfirmCheck.setVisibility(View.VISIBLE);
    }
 
    protected void initData(){
        super.initData();
        DeviceIntroductionInfo deviceIntroductionInfo= DeviceAddModel.newInstance().getDeviceInfoCache().getDevIntroductionInfo();
        if(deviceIntroductionInfo!=null){
            String tipImg=deviceIntroductionInfo.getImageInfos().get(DeviceAddHelper.OMSKey.SOFT_AP_MODE_RESULT_PROMPT_IMAGE);
            String tipTxt=deviceIntroductionInfo.getStrInfos().get(DeviceAddHelper.OMSKey.SOFT_AP_MODE_RESULT_INTRODUCTION);
            String checkTxt=deviceIntroductionInfo.getStrInfos().get(DeviceAddHelper.OMSKey.SOFT_AP_MODE_CONFIRM_INTRODUCTION);
            mTipTxt.setText(tipTxt);
            mConfirmCheck.setText(checkTxt);
            ImageLoader.getInstance().displayImage(tipImg,mTipImg, DeviceAddImageLoaderHelper.getCommonOptions());
        }
    }
}