Shadow of ImageView in android

 Shadow of ImageView in android

Gradle

dependencies {
    compile 'com.yinglan.shadowimageview:shadowimageview:1.0.4'
}

In layout

	    <com.yinglan.shadowimageview.ShadowImageView
	            android:id="@+id/shadow"
                android:layout_width="300dp"
                android:layout_height="300dp"
                app:shadowRound="20dp"
                app:shadowSrc="@mipmap/lotus"
                app:shadowColor="@color/colorAccent"/>

Set Picture

    shadow.setImageResource(resID); 
    shadow.setImageDrawable(drawable); 
    shadow.setImageBitmap(bitmap);

Set the picture radius

    shadow.setImageRadius(radius);

Set the shadow color of the image

    shadow.setImageShadowColor(color);

Comments

Popular posts from this blog

the distance between two cities (in km is input through the keyboard. write a program to convert and print this distance in meter ,feet inches and centimeter.

CREATE UNIT CONVERTER APP

write a program to check whether a triangle is valid or not, when the threeangles of the triangle are entered through the keyboard. A triangle is valid if the sumof all the three angles is equal to 180 degrees