Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loader - Gooey light Effect in android

Tags:

android

I saw a loading cursor like image link below. My question is how can I create this with Java or XML for using in Android applications.

Loader Gif Image

like image 571
Mehrdad Safari Avatar asked Jan 19 '26 02:01

Mehrdad Safari


1 Answers

Hi Mehrdad Safari,

     Try this code with required image inserting in animation_code.xml.

1)XML File for showing loader

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/loadingPanel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center" >

    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminate="true"
        android:indeterminateDrawable="@drawable/animation_code" />

</RelativeLayout>

2) animation_code:

<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android" 
    android:drawable="@drawable/a" 
    android:pivotX="50%"
    android:pivotY="50%"

     />
like image 165
KURUMADDALI ANURAG Avatar answered Jan 21 '26 16:01

KURUMADDALI ANURAG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!