Example usage for android.graphics Color LTGRAY

List of usage examples for android.graphics Color LTGRAY

Introduction

In this page you can find the example usage for android.graphics Color LTGRAY.

Prototype

int LTGRAY

To view the source code for android.graphics Color LTGRAY.

Click Source Link

Usage

From source file:Main.java

public static int getSecurityStatusColor(final float security) {
    if (security > 0) {
        return Color.LTGRAY;
    }/* w w  w . j a  v a  2  s . co m*/
    if (security > -2.0) {
        return Color.WHITE;
    }
    return getSecurityLevelColor((security + 10) / 20);
}

From source file:Main.java

public static void interweaveListViewBgColor(int position, View v) {
    if (position % 2 == 0) {
        v.setBackgroundColor(Color.WHITE);
    } else {/*from  w  w w  .java2s .  co  m*/
        v.setBackgroundColor(Color.LTGRAY);
    }
}

From source file:Main.java

public static int getRandomColor() {
    List<Integer> colors = new ArrayList<>();
    colors.add(Color.BLACK);// w  ww.  ja v  a2s  . co m
    colors.add(Color.RED);
    colors.add(Color.GREEN);
    colors.add(Color.BLUE);
    colors.add(Color.YELLOW);
    colors.add(Color.GRAY);
    colors.add(Color.MAGENTA);
    colors.add(Color.CYAN);
    colors.add(Color.LTGRAY);
    return colors.get(new Random().nextInt(colors.size()));
}

From source file:Main.java

public static void applyDialogStyle(ViewGroup viewGroup) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        return;//w  w w .j  a  v a 2s.  c  o  m
    }

    viewGroup.setBackgroundColor(Color.BLACK);

    // Theme.AppCompat.Light makes all text and background black
    final int childCount = viewGroup.getChildCount();
    for (int i = 0; i < childCount; i++) {
        View childView = viewGroup.getChildAt(i);
        if (childView instanceof ListView) {
            childView.setBackgroundColor(Color.LTGRAY);
        } else if (childView instanceof ViewGroup) {
            applyDialogStyle((ViewGroup) childView);
        } else if (childView instanceof TextView) {
            ((TextView) childView).setTextColor(Color.WHITE);
        }
    }
}

From source file:com.google.android.apps.santatracker.doodles.tilt.ToggleableBounceActor.java

public ToggleableBounceActor(Polygon collisionBody, CollisionActor onTrigger, CollisionActor offTrigger) {
    super(collisionBody);
    this.onTrigger = onTrigger;
    this.offTrigger = offTrigger;

    collisionBody.setPaintColors(Color.RED, Color.LTGRAY, 0x6400ff00);
    onTrigger.collisionBody.setPaintColors(Color.GREEN, Color.RED, 0x6400ff00);
    offTrigger.collisionBody.setPaintColors(Color.BLACK, Color.RED, 0x6400ff00);
}

From source file:siminov.connect.sample.fragments.MenuSlider.java

public void onResume() {
    super.onResume();

    int[] colors = { 0, Color.LTGRAY, 0 };
    getListView().setDivider(new GradientDrawable(Orientation.RIGHT_LEFT, colors));
    getListView().setDividerHeight(1);//from  w ww  .j av a2 s. c  o m
    getListView().setCacheColorHint(Color.TRANSPARENT);

    getListView().setOnItemClickListener(this);
}

From source file:org.akvo.caddisfly.sensor.colorimetry.strip.widget.PercentageMeterView.java

public PercentageMeterView(@NonNull Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);

    paint = new Paint();
    paint.setColor(Color.LTGRAY);
    paint.setStyle(Paint.Style.FILL);
    paint.setAntiAlias(true);/*from   ww w  .  ja va2s  . c om*/

    //if (!isInEditMode()) {
    green = ContextCompat.getColor(context, R.color.jungle_green);
    orange = ContextCompat.getColor(context, R.color.orange);
    red = ContextCompat.getColor(context, R.color.cardinal);
    //}
}

From source file:com.banxi1988.v2exgeek.view.CircleImageView.java

public CircleImageView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    initImageview(Color.LTGRAY, 13);
}

From source file:com.banxi1988.v2exgeek.view.CircleImageView.java

public CircleImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
    super(context, attrs, defStyleAttr, defStyleRes);
    initImageview(Color.LTGRAY, 13);
}

From source file:com.uphyca.recyclerviewcommons.sample.DragAndDropWithHandleAdapter.java

public void onDragStart(RecyclerView.ViewHolder viewHolder) {
    viewHolder.itemView.setBackgroundColor(Color.LTGRAY);
}