| | |
| | | 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 HomeUIUtil { |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取圆形专题背景 |
| | | * |
| | | * @param bgColor |
| | | * @return |
| | | */ |
| | | public static GradientDrawable getCircleSpecialBg(Context context, String bgColor) { |
| | | GradientDrawable gd = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, |
| | | new int[]{Color.parseColor(bgColor), Color.parseColor(bgColor)}); |
| | | gd.setCornerRadius(DimenUtils.dip2px(context, 20)); |
| | | return gd; |
| | | } |
| | | |
| | | |
| | | } |