Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spinkit does not stop animation #69

Open
aurelianr opened this issue Sep 13, 2019 · 2 comments
Open

spinkit does not stop animation #69

aurelianr opened this issue Sep 13, 2019 · 2 comments

Comments

@aurelianr
Copy link

aurelianr commented Sep 13, 2019

Hello

I am using the following code:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context=".MainActivity" tools:showIn="@layout/activity_main">


    <com.github.ybq.android.spinkit.SpinKitView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/spin_kit"
        style="@style/SpinKitView.Wave"
        android:layout_width="100dp"
        android:layout_height="40dp"
        android:layout_gravity="center"
        android:indeterminate="false"
        android:indeterminateOnly="true"
        android:visibility="visible"
        android:background="@color/cardview_dark_background"
        app:SpinKit_Color="@color/colorAccent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"/>
    <!--<ProgressBar-->
        <!--xmlns:app="http://schemas.android.com/apk/res-auto"-->
        <!--android:id="@+id/spin_kit"-->
        <!--style="@style/SpinKitView.Wave"-->
        <!--android:layout_width="100dp"-->
        <!--android:layout_height="40dp"-->
        <!--android:layout_gravity="center"-->
        <!--android:indeterminate="false"-->
        <!--android:indeterminateOnly="true"-->
        <!--android:visibility="visible"-->
        <!--android:background="@color/cardview_dark_background"-->
        <!--app:SpinKit_Color="@color/colorAccent"-->
        <!--app:layout_constraintTop_toTopOf="parent"-->
        <!--app:layout_constraintBottom_toBottomOf="parent"-->
        <!--app:layout_constraintRight_toRightOf="parent"-->
        <!--app:layout_constraintLeft_toLeftOf="parent"/>-->


</androidx.constraintlayout.widget.ConstraintLayout>

I have a spin kit with wave animation but is animating forever.
I need to stop and to block in the initial position after a while.

Best regards,
Aurelian

@rahulkushwaha482
Copy link

Hi @aurelianr I thing this is not possible in this .This is fixed forever. I also tryied but can't stop as your requiremenet.

@aurelianr
Copy link
Author

Hi @rahulkushwaha482
I made a workaround using a CustomView on which I draw five rectangles in a similar position like those from the spinkit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants