android.os.Parcelable#getClass ( )源码实例Demo

下面列出了android.os.Parcelable#getClass ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: kognitivo   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码3 项目: Klyph   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码4 项目: barterli_android   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码8 项目: Abelana-Android   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码9 项目: KlyphMessenger   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码11 项目: HypFacebook   文件: ProfilePictureView.java
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
/**
 * If the passed in state is a Bundle, an attempt is made to restore from it.
 * @param state a Parcelable containing the current state
 */
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state.getClass() != Bundle.class) {
        super.onRestoreInstanceState(state);
    } else {
        Bundle instanceState = (Bundle)state;
        super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY));

        profileId = instanceState.getString(PROFILE_ID_KEY);
        presetSizeType = instanceState.getInt(PRESET_SIZE_KEY);
        isCropped = instanceState.getBoolean(IS_CROPPED_KEY);
        queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY);
        queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY);

        setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY));

        if (instanceState.getBoolean(PENDING_REFRESH_KEY)) {
            refreshImage(true);
        }
    }
}
 
源代码13 项目: mollyim-android   文件: ArcProgressBar.java
@Override
protected void onRestoreInstanceState(Parcelable state) {
  if (state.getClass() != Bundle.class) throw new IllegalStateException("Expected");

  Bundle restoreState = (Bundle) state;

  Parcelable superState = restoreState.getParcelable(SUPER);
  super.onRestoreInstanceState(superState);

  progress = restoreState.getLong(PROGRESS);
}