/*
 * Copyright (c) 2015. Ncomz. All Rights Reserved
 */

package com.ntels.onecable.view.things;

import com.ntels.onecable.R;
import com.ntels.onecable.common.Constants;
import com.ntels.onecable.common.util.Util;
import com.ntels.onecable.common.widget.CustomActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

/**
 * <pre>
 * 1. ClassName :   ThingsDeviceAdd3rd
 * 2. FileName  :   ThingsDeviceAdd3rd.java
 * 3. Package   :   com.ntels.onecable.view.things
 * 4. Date      :   2016-11-25
 * 5. Author    :   aaron
 * 6. Comment   :   Initialize
 * </pre>
 */
public class ThingsDeviceAdd3rd extends CustomActivity implements View.OnClickListener {

    /*공통*/
    private Activity mActivity;
    private Intent mIntent;
    private Util mUtil = new Util();

    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        mActivity = ThingsDeviceAdd3rd.this;

        View viewToLoad = LayoutInflater.from(mActivity).inflate(R.layout.things_device_add_03, null);
        this.setContentView(viewToLoad);

        setDisp();
    }

    @Override
    public void onClick(View view) {

        switch (view.getId()) {
            case R.id.llBtn1:
                onBackPressed();
                break;
            default:
                break;
        }
    }

    @Override
    public void onBackPressed() {

        mIntent = new Intent();
        mIntent.putExtra(Constants.EXTRA_RELOAD_FLAG, true);
        mActivity.setResult(RESULT_OK, mIntent);
        finish();
    }

    /**
     * UI display.
     */
    private void setDisp() {

        mUtil.getView(mActivity, R.id.llBtn1).setOnClickListener(this);
        mUtil.getView(mActivity, R.id.llPageRoot).setVisibility(View.VISIBLE);

    }

}

