package com.tejia.lijin.app.util.ui;
|
|
import android.content.Context;
|
import android.graphics.Color;
|
import android.graphics.drawable.GradientDrawable;
|
|
import com.wpc.library.util.common.DimenUtils;
|
|
public class GradientDrawableUtil {
|
|
public static GradientDrawable getShopTypeBackground(Context context, String color) {
|
GradientDrawable drawable = new GradientDrawable();
|
drawable.setCornerRadius(DimenUtils.dip2px(context,3));
|
drawable.setStroke(DimenUtils.dip2px(context,1), Color.parseColor(color));
|
drawable.setColor(Color.TRANSPARENT);
|
return drawable;
|
}
|
|
|
public static GradientDrawable getOrderType(Context context, String color) {
|
GradientDrawable drawable = new GradientDrawable();
|
drawable.setCornerRadius(DimenUtils.dip2px(context,3));
|
drawable.setColor(Color.parseColor(color));
|
return drawable;
|
}
|
|
}
|