Example usage for android.graphics.drawable GradientDrawable SWEEP_GRADIENT

List of usage examples for android.graphics.drawable GradientDrawable SWEEP_GRADIENT

Introduction

In this page you can find the example usage for android.graphics.drawable GradientDrawable SWEEP_GRADIENT.

Prototype

int SWEEP_GRADIENT

To view the source code for android.graphics.drawable GradientDrawable SWEEP_GRADIENT.

Click Source Link

Document

Gradient is a sweep.

Usage

From source file:com.arsy.maps_library.MapRadar.java

private void setDrawableAndBitmap() {
    mOuterDrawable.setColor(mFillColor);
    mOuterDrawable.setStroke(UiUtil.dpToPx(mStrokeWidth), mStrokeColor);
    mBackgroundImageDescriptor = UiUtil.drawableToBitmapDescriptor(mOuterDrawable);
    GradientDrawable radarDrawable = new GradientDrawable(GradientDrawable.Orientation.TL_BR, mColors);
    radarDrawable.setGradientType(GradientDrawable.SWEEP_GRADIENT);
    radarDrawable.setShape(GradientDrawable.OVAL);
    radarDrawable.setSize(1200, 1200);//  ww w . j  a v  a 2 s  .c  o m
    mBackgroundImageSweepDescriptor = UiUtil.drawableToBitmapDescriptor(radarDrawable);
}