Android Open Source - BleSensorTag Error Dialog

From Project

Back to project page BleSensorTag.


The source code is released under:

MIT License

If you think the Android project BleSensorTag 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 sample.ble.sensortag.dialogs;
//from  ww  w  . j  av  a2  s  . co  m
import android.content.DialogInterface;
import android.os.Bundle;
import sample.ble.sensortag.R;

public class ErrorDialog extends AppDialog<ErrorDialog.ErrorDialogListener> {
    public static final String TAG = ErrorDialog.class.getSimpleName();

    public interface ErrorDialogListener {
        public void onDismiss(ErrorDialog f);

    private int message;

    public static ErrorDialog newInstance(int message) {
        final ErrorDialog dialog = new ErrorDialog();
        dialog.message = message;

        return dialog;

    public Dialog onCreateDialog(Bundle savedInstanceState) {
        return new AlertDialog.Builder(getActivity())
                .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        if (getListener() != null)

Java Source Code List