Android Open Source - notify Fragment Connect






From Project

Back to project page notify.

License

The source code is released under:

GNU General Public License

If you think the Android project notify listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.notify;
//from  w  w  w  .java 2  s  . co  m
import android.app.Fragment;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class FragmentConnect extends Fragment implements View.OnClickListener {
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_connect, container, false);
    }

    public void onStart() {
        super.onStart();
        getActivity().findViewById(R.id.connect_button_saved).setOnClickListener(this);
        getActivity().findViewById(R.id.connect_button_automatic).setOnClickListener(this);
        getActivity().findViewById(R.id.connect_button_qrcode).setOnClickListener(this);
        getActivity().findViewById(R.id.connect_button_manual).setOnClickListener(this);
        if (MainActivity.savedIp == "") {
            getActivity().findViewById(R.id.connect_button_saved).setEnabled(false);
        }
    }

    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.connect_button_saved:
                MainActivity.df.displayConnecting();
                MainActivity.ma.startConnection(Uri.parse(MainActivity.savedIp));
                break;
            case R.id.connect_button_automatic:
                MainActivity.df.displayConnecting();
                new Thread(MainActivity.br).start();
                MainActivity.status = "connecting";
                break;
            case R.id.connect_button_qrcode:
                if (!OurUtils.scanQr()) {
                    MainActivity.df.displayNoQrcodeScanner();
                }
                break;
            case R.id.connect_button_manual:
                MainActivity.df.displayManual();
                break;
        }
    }
}




Java Source Code List

com.example.notify.AccessibilityListenerService.java
com.example.notify.BackgroundService.java
com.example.notify.Broadcast.java
com.example.notify.DisplayFragments.java
com.example.notify.EnumMessage.java
com.example.notify.FragmentAccessibility.java
com.example.notify.FragmentBroadcastReconnect.java
com.example.notify.FragmentConnect.java
com.example.notify.FragmentConnected.java
com.example.notify.FragmentConnecting.java
com.example.notify.FragmentManual.java
com.example.notify.FragmentNoQrcodeScanner.java
com.example.notify.FragmentQrcodeWrong.java
com.example.notify.FragmentReconnect.java
com.example.notify.FragmentWifiWarning.java
com.example.notify.IntentBroadcastReceiver.java
com.example.notify.MainActivity.java
com.example.notify.OurUtils.java