Android Open Source - SuTransPlus Network Dialog Fragment






From Project

Back to project page SuTransPlus.

License

The source code is released under:

GNU General Public License

If you think the Android project SuTransPlus 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.omegavesko.sutransplus;
//from ww  w . j a  va2 s.  c o m
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;

import com.omegavesko.sutransplus.R;

public class NetworkDialogFragment extends DialogFragment {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        // Use the Builder class for convenient dialog construction
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setMessage("Fire ze missiles?")
                .setPositiveButton("Fire ze missiles!", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        // FIRE ZE MISSILES!
                    }
                })
                .setNegativeButton("No :(", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        // User cancelled the dialog
                    }
                });
        // Create the AlertDialog object and return it
        return builder.create();
    }
}




Java Source Code List

com.omegavesko.sutransplus.ApplicationTest.java
com.omegavesko.sutransplus.DatabaseHandler.java
com.omegavesko.sutransplus.HomeActivityListAdapter.java
com.omegavesko.sutransplus.HomeActivity.java
com.omegavesko.sutransplus.LineActivityListAdapter.java
com.omegavesko.sutransplus.LineActivity.java
com.omegavesko.sutransplus.Linija.java
com.omegavesko.sutransplus.NetworkDialogFragment.java
com.omegavesko.sutransplus.Polazak.java