Android Studio design button animation



Build Gradle Project

allprojects {
    repositories {
        google()
        jcenter()
          maven {
            url 'https://dl.bintray.com/spark/maven'
        }


Android Studio Design Animation 

Build Gradle Module

implementation 'me.spark:submitbutton:1.0.1'

Android Studio Design Animation


Main Activity

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:orientation="vertical"
        android:background="@drawable/gradientsgreen"
        android:gravity="center_horizontal"
        tools:context=".design10part15">

    <com.spark.submitbutton.SubmitButton
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/ok"
            android:textSize="14sp"
            android:textColor="@color/gray"
            app:sub_btn_background="@color/white"
            app:sub_btn_tick_color="@color/yellow"
            app:sub_btn_duration="1000"
            app:sub_btn_line_color="@color/colorPrimary"
            app:sub_btn_ripple_color="@color/colorPrimary" />

    <com.spark.submitbutton.SubmitButton
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/submit1"
            android:textColor="@color/gray"
            android:textSize="12sp"
            app:sub_btn_background="@color/white"
            app:sub_btn_duration="2000"
            app:sub_btn_line_color="@color/colorPrimary"
            app:sub_btn_ripple_color="@color/colorPrimary"
            app:sub_btn_tick_color="@color/white" />

    <com.spark.submitbutton.SubmitButton
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:sub_btn_tick_color="@color/white"
            android:text="@string/submit2"
            android:textSize="15sp"
            android:textColor="@color/white"
            app:sub_btn_duration="3000" />

    <com.spark.submitbutton.SubmitButton
            android:id="@+id/btn3"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/submit3"
            android:textColor="@color/white"
            android:textSize="18sp"
            app:sub_btn_duration="4000" />

</LinearLayout>

Android Studio Design Animation

Subscribe to receive free email updates:

0 Response to "Android Studio design button animation"

Post a Comment