Java Code Examples for android.graphics.drawable.GradientDrawable#OVAL

The following examples show how to use android.graphics.drawable.GradientDrawable#OVAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DrawableHelper.java    From NoboButton with Apache License 2.0 5 votes vote down vote up
private int getShape() {
	switch (mBuilder.shape) {
		case SHAPE_OVAL:
			return GradientDrawable.OVAL;
		default:
			return GradientDrawable.RECTANGLE;

	}
}
 
Example 2
Source File: DrawableValue.java    From proteus with Apache License 2.0 5 votes vote down vote up
private static int getShape(String shape) {
  switch (shape) {
    case SHAPE_RECTANGLE:
      return GradientDrawable.RECTANGLE;
    case SHAPE_OVAL:
      return GradientDrawable.OVAL;
    case SHAPE_LINE:
      return GradientDrawable.LINE;
    case SHAPE_RING:
      return GradientDrawable.RING;
    default:
      return SHAPE_NONE;

  }
}