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
package com.mm.android.deviceaddmodule.p_nb;
 
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;
 
import com.mm.android.deviceaddmodule.R;
import com.mm.android.deviceaddmodule.base.BaseTipFragment;
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.entity.deviceadd.DeviceAddInfo;
import com.mm.android.deviceaddmodule.mobilecommon.entity.deviceadd.DeviceIntroductionInfo;
import com.mm.android.deviceaddmodule.model.DeviceAddModel;
import com.nostra13.universalimageloader.core.ImageLoader;
 
public class TipNBFragment extends BaseTipFragment {
 
    public static TipNBFragment newInstance() {
        TipNBFragment fragment = new TipNBFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }
 
    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        DeviceAddHelper.updateTile(DeviceAddHelper.TitleMode.MORE);
    }
 
    @Override
    protected void initView(View view) {
        super.initView(view);
        tipImageMatch();
        mConfirmCheck.setVisibility(View.GONE);
        mTipTxt.setText(R.string.add_device_nb_tip1);
        mTipTxt2.setVisibility(View.VISIBLE);
        mTipTxt2.setText(R.string.add_device_nb_tip2);
    }
 
    @Override
    protected void initData() {
        super.initData();
        DeviceAddInfo deviceAddInfo= DeviceAddModel.newInstance().getDeviceInfoCache();
        DeviceIntroductionInfo deviceIntroductionInfo = deviceAddInfo.getDevIntroductionInfo();
        if (deviceIntroductionInfo != null) {
            String tipImage = deviceIntroductionInfo.getImageInfos().get(DeviceAddHelper.OMSKey.THIRD_PARTY_PLATFORM_MODE_GUIDING_LIGHT_IMAGE);
            if (!TextUtils.isEmpty(tipImage)) {
                ImageLoader.getInstance().displayImage(tipImage, mTipImg,
                        DeviceAddImageLoaderHelper.getCommonOptions());
            }
        }
    }
 
    @Override
    protected void nextAction() {
        PageNavigationHelper.gotoCloudConnectPage(this);
    }
 
    @Override
    protected void helpAction() {
 
    }
 
    @Override
    protected void init() {
        initView(mView);
        initData();
    }
}