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 ww. j a v a2 s. c o m*/ import android.app.Fragment; import android.app.FragmentTransaction; public class DisplayFragments { public void setFragment(Fragment f) { this.setFragment(f, true); } public void setFragment(Fragment f, Boolean log) { if (!MainActivity.isOpen) { return; } FragmentTransaction ft = MainActivity.ma.fm.beginTransaction(); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); ft.replace(R.id.fragment_container, f, "fc"); ft.commitAllowingStateLoss(); if (log) { if (MainActivity.ma.displayList.size() > 1 && f.getClass().toString().equals(MainActivity.ma.displayList.get(MainActivity.ma.displayList.size() - 1).getClass().toString())) { return; } MainActivity.ma.displayList.add(f); } } public void displayConnect() { MainActivity.ma.displayList.clear(); this.setFragment(new FragmentConnect()); } public void displayConnecting() { this.setFragment(new FragmentConnecting(), false); } public void displayConnected() { MainActivity.ma.displayList.clear(); MainActivity.ma.displayList.add(new FragmentConnect()); this.setFragment(new FragmentConnected()); } public void displayReconnect(Boolean died) { this.setFragment(new FragmentReconnect(died)); } public void displayAccessibility() { this.setFragment(new FragmentAccessibility()); } public void displayBroadcastReconnect() { this.setFragment(new FragmentBroadcastReconnect()); } public void displayQrcodeWrong() { this.setFragment(new FragmentQrcodeWrong()); } public void displayNoQrcodeScanner() { this.setFragment(new FragmentNoQrcodeScanner()); } public void displayManual() { this.setFragment(new FragmentManual()); } public void displayWifiWarning() { this.setFragment(new FragmentWifiWarning()); } }