Material color palette Shows shadow of the image

Contents
Material color palette View
This library shows Material color palette shadow of the image by it’s palette color.

Gradle
1 2 3 4 5 6 | dependencies { ... implementation 'com.jackandphantom.android:paletteshadowview:1.0.1' implementation 'com.android.support:palette-v7:28.0.0' } |
1.Few ScreenShots
SHADOW | CORNER RADIUS | SHADOW OFFSET |
---|---|---|
X
1 2 3 4 5 6 7 8 9 10 11 12 | <!-- <a> circular progressbar xml</a> --> <com.jackandphantom.paletteshadowview.PaletteShadowView android:layout_width="250dp" android:layout_height="250dp" android:layout_marginTop="120dp" android:id="@+id/hr" app:paletteOffsetX="15" app:paletteOffsetY="15" android:layout_centerHorizontal="true" app:paletteSrc="@drawable/image" /> |
XML ATTRIBUTE | DESCRIPTION |
---|---|
app:paletteOffsetX | represents the offset of the shadow in the x direction |
app:paletteOffsetY | represents the offset of the shadow in the y direction |
app:paletteSrc | represents a picture resource |
app:paletteRoundRadius | Indicates the corner radius |
app:paletteShadowRadius | Indicates shadow blurring |
app:paletteShadowColor | Indicate the color of the shadow |
JAVA
1 2 3 4 5 | PaletteShadowView paletteShadowView = findViewById(R.id.paletteImage); paletteShadowView.setImageResource(R.drawable.image); paletteShadowView.setShadowOffest(10, 10); paletteShadowView.setRoundedRadius(50); |
X
Public Methods
METHOD | DESCRIPTION |
---|---|
Public void setShadowColor(int color) | Represents the color of the custom settings control shadow |
public void setRoundedRadius(int radius) | Represents the corner of image |
public void setShadowOffest(int offsetX, int offsetY) | Represents the offset of the shadow in the x and y direction |
public void setShadowRadius(int radius) | Indicates shadow blurring |
Public int[] getVibrantColor() | Represents an array of colors to get the Vibrant theme; assuming that the color array is arry, arry[0] is the color used by the recommended title, arry[1] is the color used by the recommended body, and arry[2] is the recommended The color used for the background. Colors are for recommendations only, you can choose |
Public int[] getDarkVibrantColor() | Represents an array of colors for obtaining the DarkVibrant theme. The meaning of the array element is the same as above |
Public int[] getLightVibrantColor() | Represents the color array of the LightVibrant theme. The meaning of the array element is the same as above |
Public int[] getMutedColor() | Represents the color array of the Muted theme. The meaning of the array element is the same as above. |
Public int[] getDarkMutedColor() | Represents the color array of the DarkMuted theme. The meaning of the array element is the same as above. |
Public int[] getLightMutedColor() | Represents the color array of the LightMuted theme. The meaning of the array element is the same as above |
public void setVibrantColor() | set the vibrant theme as the shadow color , remember it may be null. |
public void setDarkVibrantColor() | set the DarkVibrant theme as the shadow color , remember it may be null. |
public void setLightVibrantColor() | set the LightVibrant theme as the shadow color , remember it may be null. |
public void setMutedColor() | set the Muted theme as the shadow color , remember it may be null. |
public void setDarkMutedColor() | set the DarkMuted theme as the shadow color , remember it may be null. |
public void setLightMutedColor() | set the LightMuted theme as the shadow color , remember it may be null. |
Read this :- Android Permissions Implement Popup
Read this:-Helps to create a bunch of alert dialogs with Lottie
GitHub
sparrow007/PaletteShadowView
This library shows the shadow of the image by it’s palette color. — Read MoreLatest commit to the master branch on 3-12-2019Download as zip
1,687 total views, 3 views today
(Visited 346 times, 1 visits today)