How to apply glow effect?
I am trying to create this type of horizontal ProgressBar
but no idea about the glowing effect for as starting point of progress.
Here is my code for gradient color
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@android:id/background">
<shape>
<corners android:radius="0dip" />
<solid android:color="#ff9d9e9d"/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:angle="180"
android:startColor="#8872f8fc"
android:endColor="#886dc0e3" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:angle="180"
android:startColor="#31c6f7"
android:centerColor="#2ea6d1"
android:endColor="#2884a6" />
</shape>
</clip>
</item>
</layer-list>
Android ProgressBar is a graphical view indicator that shows some progress. Android progress bar displays a bar representing the completing of the task. Progress bar in android is useful since it gives the user an idea of time to finish its task.
Progress bar supports two modes to represent progress: determinate, and indeterminate. For a visual overview of the difference between determinate and indeterminate progress modes, see Progress & activity. Display progress bars to a user in a non-interruptive way.
You can use a png image for glowing head. Use < bitmap> tag inside the layer-list and align it to right. I did a similar thing for a completely different application
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape>
<gradient
android:angle="270"
android:endColor="#4C4C4C"
android:startColor="#303030" />
<stroke
android:width="0dp"
android:color="#000000" />
<corners android:radius="0dp" />
<padding
android:bottom="0dp"
android:left="5dp"
android:right="0dp"
android:top="0dp" />
</shape>
</item>
<item>
<bitmap
android:antialias="true"
android:gravity="right|bottom|fill_vertical"
android:src="@drawable/spinner_down_arrow" />
</item>
</layer-list>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With