android.widget.ImageView#setImageAlpha ( )源码实例Demo

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

源代码1 项目: delion   文件: ExpandedControllerActivity.java
@Override
protected void onResume() {
    super.onResume();
    if (mVideoInfo.state == PlayerState.FINISHED) finish();
    if (mMediaRouteController == null) return;

    // Lifetime of the media element is bound to that of the {@link MediaStateListener}
    // of the {@link MediaRouteController}.
    RecordCastAction.recordFullscreenControlsShown(
            mMediaRouteController.getMediaStateListener() != null);

    mMediaRouteController.prepareMediaRoute();

    ImageView iv = (ImageView) findViewById(R.id.cast_background_image);
    if (iv == null) return;
    Bitmap posterBitmap = mMediaRouteController.getPoster();
    if (posterBitmap != null) iv.setImageBitmap(posterBitmap);
    iv.setImageAlpha(POSTER_IMAGE_ALPHA);
}
 
@Override
protected void onResume() {
    super.onResume();
    if (mVideoInfo.state == PlayerState.FINISHED) finish();
    if (mMediaRouteController == null) return;

    // Lifetime of the media element is bound to that of the {@link MediaStateListener}
    // of the {@link MediaRouteController}.
    RecordCastAction.recordFullscreenControlsShown(
            mMediaRouteController.getMediaStateListener() != null);

    mMediaRouteController.prepareMediaRoute();

    ImageView iv = (ImageView) findViewById(R.id.cast_background_image);
    if (iv == null) return;
    Bitmap posterBitmap = mMediaRouteController.getPoster();
    if (posterBitmap != null) iv.setImageBitmap(posterBitmap);
    iv.setImageAlpha(POSTER_IMAGE_ALPHA);
}
 
源代码3 项目: 365browser   文件: ExpandedControllerActivity.java
@Override
protected void onResume() {
    super.onResume();
    if (mVideoInfo.state == PlayerState.FINISHED) finish();
    if (mMediaRouteController == null) return;

    // Lifetime of the media element is bound to that of the {@link MediaStateListener}
    // of the {@link MediaRouteController}.
    RecordCastAction.recordFullscreenControlsShown(
            mMediaRouteController.getMediaStateListener() != null);

    mMediaRouteController.prepareMediaRoute();

    ImageView iv = (ImageView) findViewById(R.id.cast_background_image);
    if (iv == null) return;
    Bitmap posterBitmap = mMediaRouteController.getPoster();
    if (posterBitmap != null) iv.setImageBitmap(posterBitmap);
    iv.setImageAlpha(POSTER_IMAGE_ALPHA);
}
 
源代码4 项目: Dali   文件: LegacySDKUtil.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public static void setImageAlpha(ImageView imageView, int alpha) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        imageView.setImageAlpha(alpha);
    } else {
        imageView.setAlpha(alpha);
    }
}
 
源代码5 项目: scene   文件: ImageViewAnimationBuilder.java
@Override
public void setValue(ImageView object, int value) {
    object.setImageAlpha(value);
}
 
源代码6 项目: materialup   文件: ViewUtils.java
@Override
public void setValue(ImageView imageView, int value) {
    imageView.setImageAlpha(value);
}
 
源代码7 项目: android-proguards   文件: ViewUtils.java
@Override
public void set(ImageView imageView, int alpha) {
    imageView.setImageAlpha(alpha);
}
 
源代码8 项目: commonadapter   文件: ViewHolderImpl.java
@TargetApi(16)
public void setImageAlpha(int viewId, int alpha) {
    ImageView target = findViewById(viewId);
    target.setImageAlpha(alpha);
}
 
源代码9 项目: Pix-Art-Messenger   文件: MediaAdapter.java
static void renderPreview(Context context, Attachment attachment, ImageView imageView) {
    imageView.setBackgroundColor(StyledAttributes.getColor(context, R.attr.color_background_tertiary));
    imageView.setImageAlpha(Math.round(StyledAttributes.getFloat(context, R.attr.icon_alpha) * 255));
    imageView.setImageDrawable(StyledAttributes.getDrawable(context, getImageAttr(attachment)));
}
 
源代码10 项目: Overchan-Android   文件: CompatibilityImpl.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public static void setImageAlpha(ImageView imageView, int alpha) {
    imageView.setImageAlpha(alpha);
}
 
源代码11 项目: Conversations   文件: MediaAdapter.java
static void renderPreview(Context context, Attachment attachment, ImageView imageView) {
    imageView.setBackgroundColor(StyledAttributes.getColor(context, R.attr.color_background_tertiary));
    imageView.setImageAlpha(Math.round(StyledAttributes.getFloat(context, R.attr.icon_alpha) * 255));
    imageView.setImageDrawable(StyledAttributes.getDrawable(context, getImageAttr(attachment)));
}