Java DialogInterface.cancel方法代码示例(javadialoginterface.cancel方法代码示例汇总)

本文整理汇总了Java中android.content.DialogInterface.cancel方法的典型用法代码示例。如果您正苦于以下问题:Java DialogInterface.cancel方法的具体用法?Java DialogInterface.cancel怎么用?Java DialogInterface.cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.content.DialogInterface的用法示例。


Java DialogInterface.cancel方法代码示例(javadialoginterface.cancel方法代码示例汇总)

在下文中一共展示了DialogInterface.cancel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: system_message_popup

import android.content.DialogInterface; //导入方法依赖的package包/类
/**Pop up error message to display lengthy message, this can be used to display error message as well*/
public void system_message_popup(String popup_title, String popup_message, String popup_buttonMessage)
{
    DialogInterface.OnClickListener errMessageClickListener = new DialogInterface.OnClickListener()
    {
        @Override
        public void onClick(DialogInterface dialogInterface, int i)
        {
            dialogInterface.cancel();
        }
    };

    popUpWindow = new AlertDialog.Builder(context);
    popup_textView = new TextView(context);

    popUpWindow.setTitle(popup_title);
    popup_textView.setText(popup_message);
    popUpWindow.setPositiveButton(popup_buttonMessage, errMessageClickListener);
    popUpWindow.setView(popup_textView);
    popUpWindow.show();
} 
开发者ID:FYP17-4G,项目名称:Aardvark,代码行数:22,代码来源:App_Framework.java

示例2: onClick

import android.content.DialogInterface; //导入方法依赖的package包/类
/**
 * Listens for user's actions.
 * @param dialog Current instance of dialog.
 * @param which Id of pressed button.
 */
@Override
public void onClick(DialogInterface dialog, int which) {
    switch (which) {
        //If user presses positive button
        case DialogInterface.BUTTON_POSITIVE:
            //Check if user gave us a listener
            if (mOnDateSetListener != null)
                //Set picked year and month to the listener
                mOnDateSetListener.onYearMonthSet(mYear, mMonth);
            break;

        //If user presses negative button
        case DialogInterface.BUTTON_NEGATIVE:
            //Exit the dialog
            dialog.cancel();
            break;
    }
} 
开发者ID:Twinkle942910,项目名称:MonthYearPicker,代码行数:24,代码来源:YearMonthPickerDialog.java

示例3: createCameraAlertDialog

import android.content.DialogInterface; //导入方法依赖的package包/类
public static final Dialog createCameraAlertDialog(final Context context, int titleId, int messageId, int posiBtntextId){
    CustomDialog r = new CustomDialog(context);
    r.setTitle(titleId);
    r.setMessage(messageId);
    DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            switch (which) {
                case DialogInterface.BUTTON_POSITIVE:
                    dialog.cancel();
                    break;
            }
        }
    };
    r.setPositiveButton(posiBtntextId, onClickListener);
    r.setCancelable(false);
    return r;
} 
开发者ID:vitaviva,项目名称:QRCodeScanner,代码行数:20,代码来源:DialogUtil.java

示例4: onKey

import android.content.DialogInterface; //导入方法依赖的package包/类
/**
 * Resets image on {@literal KeyEvent.KEYCODE_BACK} to normal scale if needed, otherwise - hide the viewer.
 */
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_BACK &&
            event.getAction() == KeyEvent.ACTION_UP &&
            !event.isCanceled()) {
        if (viewer.isScaled()) {
            viewer.resetScale();
        } else {
            dialog.cancel();
        }
    }
    return true;
} 
开发者ID:achenglike,项目名称:imageviewer,代码行数:17,代码来源:ImageViewer.java

示例5: onClick

import android.content.DialogInterface; //导入方法依赖的package包/类
public void onClick(DialogInterface dialogInterface, int i) {
    dialogInterface.cancel();
} 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:u.java

示例6: onClick

import android.content.DialogInterface; //导入方法依赖的package包/类
public void onClick(DialogInterface dialogInterface, int i) {
    this.a.z = null;
    this.a.a(false);
    dialogInterface.cancel();
} 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:6,代码来源:v.java

本文标签属性:

示例:示例图

代码:代码是什么

java:javascript18岁

DialogInterface:DialogInterface

cancel:cancel汽车按键

上一篇:Java PropertyUtils.getUsablePropertyName方法代码示例(javapropertyutils.getusablepropertyide方法的典型用法代码示例)
下一篇:自缢怎么读(自缢怎么读什么意思)(自缢前夫读自缢的意思自缢怎么读什么意思自缢什么意思)

为您推荐