Android Open Source - PhotoStrips Completion Dialog Fragment






From Project

Back to project page PhotoStrips.

License

The source code is released under:

MIT License

If you think the Android project PhotoStrips 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.ahmetkizilay.image.photostrips.dialogs;
//  w  w  w. j  a v  a  2 s  .  c  o m
import com.ahmetkizilay.image.photostrips.PhotoBoothActivity;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;

public class CompletionDialogFragment extends DialogFragment{
  
  public static CompletionDialogFragment newInstance() {
    CompletionDialogFragment frag = new CompletionDialogFragment();
    Bundle args = new Bundle();
    frag.setArguments(args);
    
    return frag;
  }
  
  public Dialog onCreateDialog(Bundle savedInstanceState) {
    
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    builder.setMessage("Would you like to see the picture?")
        .setCancelable(false)
        .setPositiveButton("Yes!",
            new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dialog, int id) {
                dialog.dismiss();
                ((PhotoBoothActivity) getActivity()).positiveCompletionCallback();
              }
            })
        .setNegativeButton("Later...",
            new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dialog, int id) {
                dialog.cancel();
              }
            });
    return builder.create();
  }
}




Java Source Code List

com.ahmetkizilay.image.photostrips.AltGalleryActivity.java
com.ahmetkizilay.image.photostrips.CameraPreview.java
com.ahmetkizilay.image.photostrips.PhotoBoothActivity.java
com.ahmetkizilay.image.photostrips.PhotoCreator.java
com.ahmetkizilay.image.photostrips.ViewImageActivity.java
com.ahmetkizilay.image.photostrips.dialogs.AboutMeDialogFragment.java
com.ahmetkizilay.image.photostrips.dialogs.CompletionDialogFragment.java
com.ahmetkizilay.image.photostrips.dialogs.ConfirmDialogFragment.java
com.ahmetkizilay.image.photostrips.dialogs.PhotoCreationDialogFragment.java
com.ahmetkizilay.image.photostrips.utils.CustomHorizontalScrollView.java
com.ahmetkizilay.image.photostrips.utils.GalleryItemAdapter.java
com.ahmetkizilay.image.photostrips.utils.OnDoubleTapListener.java
com.ahmetkizilay.image.photostrips.utils.OnMultiTapListener.java
com.ahmetkizilay.image.photostrips.utils.TouchImageView.java
com.ahmetkizilay.image.photostrips.utils.TransportViewGroup.java