FileDocCategorySizeDatePackage
AlertActivity.javaAPI DocAndroid 5.1 API3097Thu Mar 12 22:22:10 GMT 2015com.android.internal.app

AlertActivity

public abstract class AlertActivity extends android.app.Activity implements android.content.DialogInterface
An activity that follows the visual style of an AlertDialog.
see
#mAlert
see
#mAlertParams
see
#setupAlert()

Fields Summary
protected AlertController
mAlert
The model for the alert.
protected AlertController.AlertParams
mAlertParams
The parameters for the alert.
Constructors Summary
Methods Summary
public voidcancel()

        finish();
    
public voiddismiss()

        // This is called after the click, since we finish when handling the
        // click, don't do that again here.
        if (!isFinishing()) {
            finish();
        }
    
public booleandispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)

        event.setClassName(Dialog.class.getName());
        event.setPackageName(getPackageName());

        ViewGroup.LayoutParams params = getWindow().getAttributes();
        boolean isFullScreen = (params.width == ViewGroup.LayoutParams.MATCH_PARENT) &&
                (params.height == ViewGroup.LayoutParams.MATCH_PARENT);
        event.setFullScreen(isFullScreen);

        return false;
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        mAlert = new AlertController(this, this, getWindow());
        mAlertParams = new AlertController.AlertParams(this);
    
public booleanonKeyDown(int keyCode, android.view.KeyEvent event)

        if (mAlert.onKeyDown(keyCode, event)) return true;
        return super.onKeyDown(keyCode, event);
    
public booleanonKeyUp(int keyCode, android.view.KeyEvent event)

        if (mAlert.onKeyUp(keyCode, event)) return true;
        return super.onKeyUp(keyCode, event);
    
protected voidsetupAlert()
Sets up the alert, including applying the parameters to the alert model, and installing the alert's content.

see
#mAlert
see
#mAlertParams

        mAlertParams.apply(mAlert);
        mAlert.installContent();