For the past some time I have been trying to create an animated gradient background to be used with my dialog box. The basic idea is that there will be a tiny dot in the background that will grow in size (and reduce in opacity). This animation has to go on incessantly. So far, this is what I have reached:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://stackoverflow.com/questions/14412361/fade-animation-in-shape-background-gradient -->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<!-- unfaded -->
<item>
<layer-list>
<!-- bottom white background color, be be there at all times -->
<shape android:shape="rectangle">
<solid android:color="@color/translucent_white_background" />
</shape>
<!-- add a small dot shape -->
</layer-list>
</item>
<!-- faded -->
<item>
<layer-list>
<!-- bottom white background color, be be there at all times -->
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
</shape>
<!-- add large faded circle, very very large -->
</layer-list>
</item>
</transition>
I could not proceed any further. I tried adding a shape
circle with 10dp
width and height but all I got was a large oval. I would be glad if you could help me finish this. Mortal Kombat, anyone?
0 comments:
Post a Comment