androidandroid-imageviewglow

How to set outer glow effect on ImageView?


I have tried this. but it is not working this on ImageView. but this code is not setting any outer glow on Image.

    android:shadowColor="#7ccb16"
    android:shadowDx="0"
    android:shadowDy="0"
    android:shadowRadius="3"

guide me how do I do this.


Solution

  • Refered form here

    using ninepatch tool in android sdk.

    <ImageView
            android:id="@+id/image_test"
            android:background="@drawable/drop_shadow"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="6px"
            android:paddingTop="4px"
            android:paddingRight="8px"
            android:paddingBottom="9px"
            android:src="@drawable/pic1"
            />
    

    I hope this will be useful to you.