Code example for Bundle

Methods: getIntgetString

0
    @Override 
    protected void onRestoreInstanceState(Bundle state) {
        super.onRestoreInstanceState(state);
         
        // Restore the clear dialog's info 
        mClearDialogBookmarkTitle = state.getString(CLEAR_DIALOG_BOOKMARK_TITLE);
        mClearDialogShortcut = (char) state.getInt(CLEAR_DIALOG_SHORTCUT, 0);
    } 
 
    @Override 
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
         
        // Save the clear dialog's info 
        outState.putCharSequence(CLEAR_DIALOG_BOOKMARK_TITLE, mClearDialogBookmarkTitle);
        outState.putInt(CLEAR_DIALOG_SHORTCUT, mClearDialogShortcut);
    } 
 
    @Override 
    protected Dialog onCreateDialog(int id) {
        switch (id) {