public class DisplayUtils
extends java.lang.Object
Constructor and Description |
---|
DisplayUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
dp(int dp) |
static android.graphics.drawable.ShapeDrawable |
getRoundedRectangleBackground(int cornerRadius,
int backgroundColor) |
static android.graphics.drawable.shapes.Shape |
getRoundedRectangleShape(int cornerRadius)
Create a rounded rectangle with a specified corner radius.
|
public static int dp(int dp)
dp
- number of design pixels.public static android.graphics.drawable.shapes.Shape getRoundedRectangleShape(int cornerRadius)
cornerRadius
- the corner radius in pixelspublic static android.graphics.drawable.ShapeDrawable getRoundedRectangleBackground(int cornerRadius, int backgroundColor)
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.