Back to project page notify.
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.
package com.example.notify; //from w w w . ja va2s . co m import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; public class FragmentConnected extends Fragment implements View.OnClickListener { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_connected, container, false); } public void onStart() { super.onStart(); getActivity().findViewById(R.id.connected_button).setOnClickListener(this); } public void onClick(View view) { if (view.getId() == R.id.connected_button) { MainActivity.ma.pre.putString("ip", BackgroundService.host.toString()); MainActivity.ma.pre.commit(); getActivity().findViewById(R.id.connected_button).setEnabled(false); ((Button)getActivity().findViewById(R.id.connected_button)).setText("Saved!"); } } }