Android Context Get getLinePaint(Context context)

Here you can find the source of getLinePaint(Context context)

Description

get Line Paint

Declaration

public static Paint getLinePaint(Context context) 

Method Source Code

//package com.java2s;

import android.content.Context;

import android.graphics.Paint;

import android.util.TypedValue;

public class Main {
    public static final int DEFAULT_LINE_THICKNESS = 5;
    public static final int DEFAULT_LINE_COLOR = 0x900099CC;

    public static Paint getLinePaint(Context context) {
        final float lineThicknessPx = TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, DEFAULT_LINE_THICKNESS,
                context.getResources().getDisplayMetrics());

        final Paint borderPaint = new Paint();
        borderPaint.setColor(DEFAULT_LINE_COLOR);
        borderPaint.setStrokeWidth(lineThicknessPx);
        borderPaint.setStyle(Paint.Style.STROKE);
        borderPaint.setAntiAlias(true);/*from   w w  w  . ja va2 s .c om*/
        return borderPaint;
    }
}

Related

  1. getInstalleApps(Context mContext)
  2. getInstance(Context context)
  3. getIntSPR(String key, Context context)
  4. getLastKnownLocation(Context context)
  5. getLineErrorPaint(Context context)
  6. getLineThickness(Context context)
  7. getLocationProvider(Context context)
  8. getLongSPR(String key, Context context)
  9. getMemoryClass(Context context)