Back to project page Visu.
The source code is released under:
Apache License
If you think the Android project Visu 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.ufavaloro.android.visu.UI; /*from w ww . j av a 2 s .c om*/ import com.ufavaloro.android.visu.study.Study; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.widget.Toast; public class StopStudyDialog extends AlertDialog { private Context mContext; private Study mStudy; public StopStudyDialog(Context context, int theme) { super(context, theme); mContext = context; } public void setup() { Builder builder = new Builder(mContext); builder.setTitle("?ATENCI?N!"); builder.setMessage("?Est? seguro que desea dejar de adquirir?"); builder.setPositiveButton("Aceptar", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { stopStudyDialogResult(true); } }); builder.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { stopStudyDialogResult(false); } }); builder.create().show(); } // Resultado del dialog de parar estudio private void stopStudyDialogResult(boolean result) { // Parar estudio == true if(result == true) { mStudy.stopRecording(); mStudy.saveStudyToGoogleDrive(); Toast.makeText(mContext, "Estudio finalizado", Toast.LENGTH_SHORT).show(); } dismiss(); } public void setStudy(Study study) { mStudy = study; } }