本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}