org.deviceconnect.android.deviceplugin.fplug.setting.fragment.FPLUGPairingFragment.java Source code

Java tutorial

Introduction

Here is the source code for org.deviceconnect.android.deviceplugin.fplug.setting.fragment.FPLUGPairingFragment.java

Source

/*
 FPLUGPairingFragment.java
 Copyright (c) 2015 NTT DOCOMO,INC.
 Released under the MIT license
 http://opensource.org/licenses/mit-license.php
 */
package org.deviceconnect.android.deviceplugin.fplug.setting.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import org.deviceconnect.android.deviceplugin.fplug.R;

/**
 * Fragment for pairing to F-PLUG
 *
 * @author NTT DOCOMO, INC.
 */
public class FPLUGPairingFragment extends Fragment {

    @Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
            final Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.pairing_fplug, container, false);
        root.findViewById(R.id.bluetooth).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));
            }
        });
        return root;
    }

}