|
| 1 | +package net.codebuff.intentio.ui; |
| 2 | + |
| 3 | +import android.app.AlertDialog; |
| 4 | +import android.app.Dialog; |
| 5 | +import android.content.DialogInterface; |
| 6 | +import android.os.Bundle; |
| 7 | +import android.support.v4.app.DialogFragment; |
| 8 | +import android.view.LayoutInflater; |
| 9 | + |
| 10 | +import net.codebuff.intentio.R; |
| 11 | + |
| 12 | +/** |
| 13 | + * Created by deepankar on 11/1/15. |
| 14 | + */ |
| 15 | +public class incorrect_file_dialog extends DialogFragment { |
| 16 | + @Override |
| 17 | + public Dialog onCreateDialog(Bundle savedInstanceState) { |
| 18 | + // Use the Builder class for convenient dialog construction |
| 19 | + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); |
| 20 | + |
| 21 | + // Get the layout inflater |
| 22 | + LayoutInflater inflater = getActivity().getLayoutInflater(); |
| 23 | + |
| 24 | + // Inflate and set the layout for the dialog |
| 25 | + // Pass null as the parent view because its going in the dialog layout |
| 26 | + builder.setView(inflater.inflate(R.layout.incorrect_file_dialog, null)) |
| 27 | + .setTitle("Incorrect File") |
| 28 | + // Add action buttons |
| 29 | + .setPositiveButton("Dismiss", new DialogInterface.OnClickListener() { |
| 30 | + @Override |
| 31 | + public void onClick(DialogInterface dialog, int id) { |
| 32 | + |
| 33 | + } |
| 34 | + }); |
| 35 | + /* .setNegativeButton("cancel'", new DialogInterface.OnClickListener() { |
| 36 | + public void onClick(DialogInterface dialog, int id) { |
| 37 | +
|
| 38 | + } |
| 39 | + });*/ |
| 40 | + return builder.create(); |
| 41 | + } |
| 42 | +} |
0 commit comments