Java Code Examples for android.support.v7.widget.CardView#getPreventCornerOverlap()
The following examples show how to use
android.support.v7.widget.CardView#getPreventCornerOverlap() .
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: NiboPlacesAutoCompleteSearchView.java From Nibo with MIT License | 5 votes |
static float calculateVerticalPadding(CardView cardView) { float maxShadowSize = cardView.getMaxCardElevation(); float cornerRadius = cardView.getRadius(); boolean addPaddingForCorners = cardView.getPreventCornerOverlap(); if (addPaddingForCorners) { return (float) (maxShadowSize * 1.5f + (1 - COS_45) * cornerRadius); } else { return maxShadowSize * 1.5f; } }
Example 2
Source File: NiboPlacesAutoCompleteSearchView.java From Nibo with MIT License | 5 votes |
static float calculateHorizontalPadding(CardView cardView) { float maxShadowSize = cardView.getMaxCardElevation(); float cornerRadius = cardView.getRadius(); boolean addPaddingForCorners = cardView.getPreventCornerOverlap(); if (addPaddingForCorners) { return (float) (maxShadowSize + (1 - COS_45) * cornerRadius); } else { return maxShadowSize; } }
Example 3
Source File: PersistentSearchView.java From PersistentSearchView with Apache License 2.0 | 5 votes |
static float calculateVerticalPadding(CardView cardView) { float maxShadowSize = cardView.getMaxCardElevation(); float cornerRadius = cardView.getRadius(); boolean addPaddingForCorners = cardView.getPreventCornerOverlap(); if (addPaddingForCorners) { return (float) (maxShadowSize * 1.5f + (1 - COS_45) * cornerRadius); } else { return maxShadowSize * 1.5f; } }
Example 4
Source File: PersistentSearchView.java From PersistentSearchView with Apache License 2.0 | 5 votes |
static float calculateHorizontalPadding(CardView cardView) { float maxShadowSize = cardView.getMaxCardElevation(); float cornerRadius = cardView.getRadius(); boolean addPaddingForCorners = cardView.getPreventCornerOverlap(); if (addPaddingForCorners) { return (float) (maxShadowSize + (1 - COS_45) * cornerRadius); } else { return maxShadowSize; } }