0

I have been searching around the interwebs for a way to create a glow/shadow effect for my ImageView inside android. I have attached a file with a concept that I created; under each theme card you can see a feathered glow effect that is the same colour as the card itself.

Would anyone that stumbled across this post know of a way to accomplish this? I have tried "layer-list" and it does somewhat of a job but doesn't contain a glow or a feather.

Any assistance would help, thanks.

Sorry, can't embed images

Community
  • 1
  • 1
  • will you expand more ? – sushildlh Oct 29 '18 at 04:39
  • @SushilKumar Sure, I am wondering how to create that blur effect that you see around each card (especially on the bottom). I am trying to make the blur effect the same colour as the card itself. I have tried looking up how to do this but the only results that appear is how apply glow to a TextView, or to create the glow in a photo editing software like photoshop and then import it into Android Studio (but that can be an issue when it comes to scaling. Any other specific information needed? Just ask :) – Chris Coulthard Oct 29 '18 at 04:52
  • have you tried Stroke in shape tag ?? – sushildlh Oct 29 '18 at 06:13

2 Answers2

1

Try this:

  • This type of shadow I get the best results by using a 9 patch images shadow.
  • You can use this link 9 patch image shadow editor

http://inloop.github.io/shadow4android/

  • Follow this link according to your recruitments you can make it.

enter image description here

i hope it helps you.

Android Geek
  • 8,956
  • 2
  • 21
  • 35
  • Thanks, I've seen this website before but thought it only saved as a .png file (which would make the corners stretch). Thanks for your suggestion as it worked! – Chris Coulthard Oct 29 '18 at 23:52
0

Try this.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:angle="135"
        android:centerColor="#6D66C0"
        android:endColor="#794D9D"
        android:startColor="#6375D5" />
    <corners android:radius="20dp" />
</shape>
  • Sorry, but I already know how to create the background gradient with rounded corners. What I need is how to make the glow effect that surrounds each card. – Chris Coulthard Oct 29 '18 at 04:46