当前位置: 首页>>代码示例>>Java>>正文


Java Outline.setAlpha方法代码示例

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


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

示例1: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
public void getOutline(View view, Outline outline) {
    if (sCornerRadius == 0) {
        sCornerRadius = view.getResources().getDimensionPixelSize(
                R.dimen.lb_rounded_rect_corner_radius);
    }
    outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), sCornerRadius);
    outline.setAlpha(1f);
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:10,代码来源:RoundedRectHelperApi21.java

示例2: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
public void getOutline(View view, Outline outline) {
    outline.setConvexPath(path);
    if (alpha >= 1.0f) {
        alpha = 0.99f;
    } else if (alpha < 0.0f) {
        alpha = 0.0f;
    }
    outline.setAlpha(alpha);
}
 
开发者ID:harjot-oberai,项目名称:MaterialShadows,代码行数:11,代码来源:CustomViewOutlineProvider.java

示例3: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
@TargetApi(VERSION_CODES.LOLLIPOP)
public void getOutline(@NonNull Outline outline) {
  Rect bounds = getBounds();
  if (!bounds.isEmpty()) {
    outline.setRoundRect(bounds, chipCornerRadius);
  } else {
    outline.setRoundRect(0, 0, getIntrinsicWidth(), getIntrinsicHeight(), chipCornerRadius);
  }

  outline.setAlpha(getAlpha() / 255f);
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:13,代码来源:ChipDrawable.java

示例4: setControlsBackground

import android.graphics.Outline; //导入方法依赖的package包/类
private void setControlsBackground(Drawable paramDrawable, boolean paramBoolean)
{
  if ((paramBoolean) && (USE_ANIMATIONS))
  {
    Drawable localDrawable = this.mControlsContainer.getBackground();
    if (localDrawable == null) {
      localDrawable = makeNonFloatingBackground();
    }
    if (paramDrawable == null) {
      paramDrawable = makeNonFloatingBackground();
    }
    if (localDrawable == paramDrawable) {
      return;
    }
    TransitionDrawable local6 = new TransitionDrawable(new Drawable[] { localDrawable, paramDrawable })
    {
      @TargetApi(21)
      public final void getOutline(Outline paramAnonymousOutline)
      {
        paramAnonymousOutline.setRect(getBounds());
        paramAnonymousOutline.setAlpha(1.0F);
      }
    };
    local6.setCrossFadeEnabled(true);
    local6.startTransition(300);
    this.mControlsContainer.setBackgroundDrawable(local6);
    return;
  }
  this.mControlsContainer.setBackgroundDrawable(paramDrawable);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:31,代码来源:PlayHeaderListLayout.java

示例5: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
public void getOutline(@NonNull Outline outline) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        outline.setRect(getBounds());
        outline.setAlpha(getAlpha() / 255.0f);
    }
}
 
开发者ID:Leao,项目名称:CodeColors,代码行数:8,代码来源:CcColorDrawable.java

示例6: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
public void getOutline(View view, Outline outline) {
    outline.setAlpha(mMinAlpha + mAlpha / (1f - mMinAlpha));
    outline.setRoundRect(mClipRect.left, mClipRect.top,
            mSourceView.getWidth() - mClipRect.right,
            mSourceView.getHeight() - mClipRect.bottom,
            mCornerRadius);
}
 
开发者ID:jzhu1224,项目名称:DeckView,代码行数:9,代码来源:AnimateableDeckChildViewBounds.java

示例7: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void getOutline(Outline outline) {
    if (mState.mEffect != null) {
        mState.mEffect.getOutline(outline);
        outline.setAlpha(getAlpha() / 255.0f);
    }
}
 
开发者ID:gentxq,项目名称:Genius-Android,代码行数:9,代码来源:TouchEffectDrawable.java

示例8: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@TargetApi (Build.VERSION_CODES.LOLLIPOP)
@Override
public void getOutline(Outline outline) {
    copyBounds(outlineRect);
    outlineRect.inset(padding, padding);
    outline.setRoundRect(outlineRect, getRadius());
    if (getAlpha() < 255) {
        outline.setAlpha(0);
    }
    //outline.setAlpha(getAlpha() / ALPHA_MAX);
}
 
开发者ID:sephiroth74,项目名称:android-target-tooltip,代码行数:12,代码来源:TooltipTextDrawable.java

示例9: getOutline

import android.graphics.Outline; //导入方法依赖的package包/类
@Override
public void getOutline(View view, Outline outline) {
    outline.setRect(0, 0, view.getWidth(), view.getHeight());
    outline.setAlpha(1.0f);
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:6,代码来源:ShadowHelperApi21.java


注:本文中的android.graphics.Outline.setAlpha方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。