Welcome Learner today in this blog post we will be creating the Kotlin library which permits you to insert typing wait animation for typing process animation in your Android ios applications. the complete source code of the application is shown Down.
Just place it in your XML layout. It can’t go either easier than that.
<com.udevel.widgetlab.TypingIndicatorView android:layout_width="wrap_content" android:layout_height="wrap_content"/>
Gradle:-
insert into your project-level build.gradle’s all-projects
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
After adding to your module-level (app) build.gradle’s dependencies block same this
dependencies {
compile 'com.github.uDevel:widgetlab:0.9.7'
Real-World Demo Source Code
activity_main.xml
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_tab_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="?attr/colorPrimary"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:textColor="#fff"/>
</android.support.v4.view.ViewPager>
See Also – Kotlin Time Date picker Dialog using JR TimeDate Picker
fragment_demo_atrribute.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Animation order: sequence, circular, last one first"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
app:animationOrder="sequence"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
app:animationOrder="circular"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
app:animationOrder="lastOneFirst"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="Animation type: \ndefault(grow), wink,\ndisappear, sliding\nbouncing sliding"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_61"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_62"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Wink"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_63"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Disappear"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_64"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
</LinearLayout>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_bounce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="800"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="2000"
app:dotAnimationType="BouncingSliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Dot Animation duration: default, 200, 2000 "/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_71"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_72"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="200"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_73"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="2000"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Animate Frequency: default, 200, 2000 "/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_81"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_82"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="200"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_83"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="2000"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
fragment_demo_attribute2.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Background: none - background - rounded background "/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:backgroundColor="#eaeaea"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Dot color: default, custom color, 2 custom colors "/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotSecondColor="#445794"
app:showBackground="true"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Dot count: default, 5"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotSecondColor="#445794"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotCount="5"
app:dotSecondColor="#445794"
app:showBackground="true"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Dot compress ratio: default, 70%, 30%"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_41"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotSecondColor="#445794"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#445794"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotMaxCompressRatio="30%"
app:dotSecondColor="#445794"
app:showBackground="true"/>
</LinearLayout>
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Dot horizontal space: default, 20dp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_51"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:showBackground="true"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_52"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotHorizontalSpacing="20dp"
app:showBackground="true"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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"
android:scrollbars="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Default - random order, grow animation"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sliding animation - With rounded background"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:animateFrequency="700"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="600"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:dotCount="3"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#6ba4a4a4"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sliding with lastOneFirst animation order"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:animateFrequency="700"
app:animationOrder="lastOneFirst"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="600"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:dotCount="3"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#6ba4a4a4"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sliding with lastOneFirst animation order again"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:animateFrequency="500"
app:animationOrder="lastOneFirst"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="800"
app:dotAnimationType="Sliding"
app:dotColor="#a4a4a4"
app:dotCount="6"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#6ba4a4a4"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Bouncing Sliding, lastOneFirst, 2 dot colors,\nfrequency 800, duration 2000"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_bounce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="10dp"
app:animateFrequency="800"
app:animationOrder="lastOneFirst"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="2000"
app:dotAnimationType="BouncingSliding"
app:dotColor="#d50000"
app:dotSecondColor="#1565c0"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grow, random, 2 dot colors, frequency/duration 3000"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view_grow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:animateFrequency="3000"
app:backgroundColor="?attr/colorAccent"
app:backgroundType="rounded"
app:dotAnimationDuration="3000"
app:dotColor="?attr/colorPrimary"
app:dotCount="5"
app:dotSecondColor="?attr/colorPrimaryDark"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grow, random, 20 dp horizontal spacing"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotCount="3"
app:dotHorizontalSpacing="20dp"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grow, random, 1 dp horizontal spacing, 15% compression"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#a4a4a4"
app:dotCount="3"
app:dotHorizontalSpacing="1dp"
app:dotMaxCompressRatio="15%"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Wink, sequence, freq. 1500, dur. 700, 2 colors"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="1500"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="700"
app:dotAnimationType="Wink"
app:dotColor="#b9b9b9"
app:dotCount="3"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#5e648e"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grow, 2 colors but with 1 color same as bg color"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="1000"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotColor="#eaeaea"
app:dotCount="3"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#a4a4a4"
app:dotSize="8dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Disappear, sequence, freq. 1000, dur. 800"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="8dp"
app:animateFrequency="1000"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="800"
app:dotAnimationType="Disappear"
app:dotColor="#a4a4a4"
app:dotCount="3"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#eaeaea"
app:dotSize="12dp"
app:showBackground="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grow, sequence, freq. 600, dur. 3000"/>
<com.udevel.widgetlab.TypingIndicatorView
android:id="@+id/typing_indicator_view11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:padding="4dp"
app:animateFrequency="500"
app:animationOrder="sequence"
app:backgroundColor="#eaeaea"
app:backgroundType="rounded"
app:dotAnimationDuration="3000"
app:dotAnimationType="Grow"
app:dotColor="#eaeaea"
app:dotCount="6"
app:dotHorizontalSpacing="4dp"
app:dotMaxCompressRatio="70%"
app:dotSecondColor="#a4a4a4"
app:dotSize="8dp"
app:showBackground="true"/>
</LinearLayout>
</ScrollView>
Read – React.js Autocomplete Search Textresult in Browser with Bootstrap And Javascript
Create MainActivity.kt
MainActivity.kt
package com.sadwyn.statepb
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.sadwyn.resultprogressbar.ResultProgressBar
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity(), ResultProgressBar.AnimationListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
startBtn.setOnClickListener { pb.reset(); pb2.reset();pb3.reset() }
successBtn.setOnClickListener { pb.success(); pb2.success(); pb3.success() }
failureBtn.setOnClickListener { pb.failure(); pb2.failure(); pb3.failure() }
pb.listener = this
}
override fun onAnimationResult(success: Boolean) {
Log.i("TAG", "Animation success status is : $success")
}
}
© 2019 GitHub, Inc.