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

The following examples show how to use android.graphics.drawable.GradientDrawable#RECTANGLE . 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: Selector.java    From a with GNU General Public License v3.0 6 votes vote down vote up
public ShapeSelector() {
    //initialize default values
    mShape = GradientDrawable.RECTANGLE;
    mDefaultBgColor = Color.TRANSPARENT;
    mDisabledBgColor = Color.TRANSPARENT;
    mPressedBgColor = Color.TRANSPARENT;
    mSelectedBgColor = Color.TRANSPARENT;
    mFocusedBgColor = Color.TRANSPARENT;
    mStrokeWidth = 0;
    mDefaultStrokeColor = Color.TRANSPARENT;
    mDisabledStrokeColor = Color.TRANSPARENT;
    mPressedStrokeColor = Color.TRANSPARENT;
    mSelectedStrokeColor = Color.TRANSPARENT;
    mFocusedStrokeColor = Color.TRANSPARENT;
    mCornerRadius = 0;
}
 
Example 2
Source File: SelectorFactory.java    From monero-wallet-android-app with MIT License 6 votes vote down vote up
private ShapeSelector() {
    //initialize default values
    mShape = GradientDrawable.RECTANGLE;
    mDefaultBgColor = Color.TRANSPARENT;
    mDisabledBgColor = Color.TRANSPARENT;
    mPressedBgColor = Color.TRANSPARENT;
    mSelectedBgColor = Color.TRANSPARENT;
    mFocusedBgColor = Color.TRANSPARENT;
    mStrokeWidth = 0;
    mDefaultStrokeColor = Color.TRANSPARENT;
    mDisabledStrokeColor = Color.TRANSPARENT;
    mPressedStrokeColor = Color.TRANSPARENT;
    mSelectedStrokeColor = Color.TRANSPARENT;
    mFocusedStrokeColor = Color.TRANSPARENT;
    mCornerRadius = 0;
}
 
Example 3
Source File: Selector.java    From MyBookshelf with GNU General Public License v3.0 6 votes vote down vote up
public ShapeSelector() {
    //initialize default values
    mShape = GradientDrawable.RECTANGLE;
    mDefaultBgColor = Color.TRANSPARENT;
    mDisabledBgColor = Color.TRANSPARENT;
    mPressedBgColor = Color.TRANSPARENT;
    mSelectedBgColor = Color.TRANSPARENT;
    mFocusedBgColor = Color.TRANSPARENT;
    mStrokeWidth = 0;
    mDefaultStrokeColor = Color.TRANSPARENT;
    mDisabledStrokeColor = Color.TRANSPARENT;
    mPressedStrokeColor = Color.TRANSPARENT;
    mSelectedStrokeColor = Color.TRANSPARENT;
    mFocusedStrokeColor = Color.TRANSPARENT;
    mCornerRadius = 0;
}
 
Example 4
Source File: CT.java    From Android-CustomToast with GNU General Public License v3.0 5 votes vote down vote up
public Builder(Context context, String text) {
    this.context = context;
    this.text = text;

    shape = GradientDrawable.RECTANGLE;
    backCol = Color.WHITE;
    borderCol = Color.BLACK;
    textCol = Color.BLACK;
    imageRes = 0;
}
 
Example 5
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 6
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;

  }
}
 
Example 7
Source File: Drawables.java    From noDrawable with Apache License 2.0 4 votes vote down vote up
private static int validShapeMode(@ShapeMode int shapeMode) {
    return shapeMode > ShapeMode.RING || shapeMode < ShapeMode.RECTANGLE
            ? GradientDrawable.RECTANGLE : shapeMode;
}