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
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%"
/>
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