Custom Button with Shadow Duolingo style Android Button

custom button with shadow

In this blog learn to create Duolingo Style Custom Button with Shadow in Android.

custom button with shadow

Duolingo is a great app (available for both Android and iOS) for language learners across the world. With more than a million active users using the app daily, there is a lot we can learn from its simple yet elegant UI design.

To get started, here is a blog on how we can create Duolingo Style Button with Shadow.

Custom Button with Shadow

In your, Android Studio Project go to res > drawable.

Right-click and click on ‘New’ > ‘Drawable Resource File’

Name the file as ‘custom_button.xml’

Now, add the following lines of XML code:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- Bottom 15dp Shadow -->
    <item>
        <shape  android:shape="rectangle">

<!--            Button Shadow Color -->
            <solid android:color="#52772C" />
            <corners android:radius="7dp" />

        </shape>
    </item>

    <!-- White Top color -->
    <item android:bottom="15px">

        <shape  android:shape="rectangle">
            <padding android:bottom="10dp"
                android:top="10dp"
                android:left="20dp"
                android:right="20dp"/>

<!--            Button TOP Color -->
            <solid android:color="#7CB342" />
            <corners android:radius="7dp" />
        </shape>

    </item>


</layer-list>
custom button with shadow
Duolingo style button with shadow

Now go to Activity or fragment and create a button.

To this button add a background attribute as:

android:background="@drawable/custom_button"

Your complete code for the button should look as follows:

 <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Duolingo Style"
        android:layout_above="@+id/btn_2"
        android:layout_margin="20dp"
        android:textColor="@android:color/white"
        android:background="@drawable/custom_button"/>

We hope you liked this blog, explore more about creating a custom button in Android Studio here.

Android Image Button with Text Example | Java & Kotlin

android image button with text

Android Image Button with Text Example in both Java and Kotlin. In this blog learn how to create an Image Button with text in Android Studio using XML code.

Though we have a widget in Android Studio known as Android ImageButton, but an ImageButton can’t have an image and a text together.

So if you’re building an app where you want to show the user the image and text both on a button, there is a smarter way to achieve the result as shown below using a RelativeLayout in Android.

android image button with text
Android Image Button with Text

Understanding Image Button Layout

To create a custom image button with a text we will create a relative layout with a custom background. Inside the relative layout, there will be an ImageView and a textView widget.

Creating a custom background for Button

We will first start with crating a custom background for our image button. Here is the XML code to create custom background.

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:state_pressed="true" >
        <shape android:shape="rectangle"  >
            <corners android:radius="3dip" />
            <stroke android:width="1dip" android:color="#5e7974" />
            <gradient android:angle="-90" android:startColor="@color/colorAccent" android:endColor="@color/colorAccent"  />
        </shape>
    </item>
    <item android:state_focused="true">
        <shape android:shape="rectangle"  >
            <corners android:radius="3dp" />
            <stroke android:width="1dip" android:color="#5e7974" />
            <solid android:color="#58857e"/>
        </shape>
    </item>
    <item >
        <shape android:shape="rectangle"  >
            <corners android:radius="7dip" />
            <stroke android:width="0dip" android:color="#5e7974" />
            <gradient android:angle="-90" android:startColor="@color/colorAccent" android:endColor="@color/colorAccent"  />
        </shape>
    </item>
</selector>

To know more about Custom Backgrounds in android click here.

Android Image Button (XML Code)

Now lets code the android image button with textView inside it.

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    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"
    tools:context=".MainActivity">

    <RelativeLayout
        android:id="@+id/image_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:background="@drawable/round_btn"
        tools:layout_editor_absoluteX="9dp"
        tools:layout_editor_absoluteY="26dp">

        <ImageView
            android:layout_margin="10dp"
            android:id="@+id/image"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:src="@drawable/ic_computer_black_24dp"/>

        <TextView
            android:layout_centerVertical="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@+id/image"
            android:layout_margin="10dp"
            android:fontFamily="sans-serif-smallcaps"
            android:textStyle="bold"
            android:paddingStart="20dp"
            android:paddingEnd="20dp"
            android:text="Connect to Laptop"
            android:textAllCaps="false"
            android:textColor="#FFF"
            android:textSize="20sp" />

    </RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

As you can interpret from the code above, we have used an android relative layout inside which we have an ImageView and a TextView both together formaing an Image Button for our project.

Custom Image Button Java Code

Here is an OnClickListener Java Code for our custom image button

package com.aaveti.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        RelativeLayout compBtn = findViewById(R.id.image_btn);
        compBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showToast("I am an Image Button");
            }
        });

    }

    void showToast(String msg){
        Toast.makeText(MainActivity.this,"The day of the week is " + msg,Toast.LENGTH_LONG).show();
    }
}

Custom Image Button Kotlin Code

Here is an OnClickListener Kotlin Code for our custom image button

package com.aaveti.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        RelativeLayout compBtn = findViewById(R.id.image_btn);
        compBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showToast("I am an Image Button");
            }
        });

    }

    void showToast(String msg){
        Toast.makeText(MainActivity.this,"The day of the week is " + msg,Toast.LENGTH_LONG).show();
    }
}

TaDa! That’s all. You’re done with creating your own Custom Image Button for your Android Project.

However, if you want to add a custom more styling like a gradient effect to your image button, view here.

Is Relative Layout something new to you or you want to refresh your knowledge about it? You can View some of our more detailed tutorial with illustrations about Relative Layout here.

Android Button Animation Top 8 Styles you can apply in Android Studio

android button animation

Android Button Animation is a great way to provide a better user experience to your app users. In this blog learn about different types of animation styles you can apply to your Android buttons widget.

android button animation
android button animation

Android Button Animation

Getting Started

To get started with this tutorial from scratch you can create an empty android studio activity else you can skip this step and proceed further if you are already working on some Android Studio project and want to learn about Android button animation.

Creating Layout file

In an empty layout file, create a simple android button widget. Code for the following is as follow:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
    tools:context=".MainActivity">

    <Button
        android:id="@+id/hello_world"
        android:layout_width="250dp"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

Coding the Android Button Animation

Now first create the Button object in your java class and lets code their animation below:

Transparency Effect (Alpha)

To get the transparency effect in your android buttons like shown in the Medium app above, we play with alpha values of our buttons.

First set the alpha value of your button to zero and then animate the alpha value to 1.0f to get complete 100% opacity. Note here you can change the curation of the animation as well by using the setDuration function. See the code below:

        //findviewbyID
        Button helloWorld = findViewById(R.id.hello_world);

        //Set button alpha to zero
        helloWorld.setAlpha(0f);
        
        //Animate the alpha value to 1f and set duration as 1.5 secs.
        helloWorld.animate().alpha(1f).setDuration(1500);

Move the button (Translation)

To move your button like we have shown in the Medium example app above, we use the translation property i.e., transationX and translationY.

Android Button Animation
Android Button Animation

To achieve an animation like the Medium app buttons, we will first use setTranslationY to change position of our button on the Y asix and then animate its position to previous location by using translationByY.

        helloWorld = findViewById(R.id.hello_world);

        helloWorld.setAlpha(0f);
        helloWorld.setTranslationY(50);
        
        helloWorld.animate().alpha(1f).translationYBy(-50).setDuration(1500);

translationX vs translationXBy

While coding you may have noticed that there are two different properties of translation for both X and Y i.e., translationX vs translationXBy.

translationX is used to animate the Android button to that particular point on the activity where as translationXBy animates the Android Button by the amount mentioned.

Rotate the Button

If you wish to rotate the button you can easily do this by using the rotation property rotation();

helloWorld = findViewById(R.id.hello_world);
helloWorld.animate().rotation(120).setDuration(3000);

Rotate on Axis

If you want to rotate the button on axis i.e, on X axis or on the Y axis, you can achieve the same by using rotationX or rotationY.

helloWorld = findViewById(R.id.hello_world);
helloWorld.animate().rotationX(120).setDuration(3000);

Scale the Button

If you wish to scale your button then you can use scaleXBy or scaleYBy property. Here is an example for the same:

helloWorld = findViewById(R.id.hello_world);
helloWorld.animate().scaleYBy(1).setDuration(3000);

Set Delay

You can easily set Delay using the setStartDelay function.

helloWorld = findViewById(R.id.hello_world);
helloWorld.setAlpha(0f);
helloWorld.setTranslationY(50);
       helloWorld.animate().alpha(1f).translationYBy(-50).setStartDelay(200).setDuration(1500);

Set Actions

One can easily set the start or the end actions after animation starts or gets finished by using withStartAction or with EndAction methods.

//End Action

helloWorld.animate().alpha(1f).translationYBy(-50).setStartDelay(200).withEndAction(new Runnable() {
            @Override
            public void run() {
                //End Action
                Toast.makeText(MainActivity.this,"Animating Button",Toast.LENGTH_SHORT).show();
            }
        }).setDuration(1500);

TaDa Viola! So here we are done with learning 8 different animation actions you apply to your Android Button Animation.

To learn more about designing a button See here: Android Button Design, 6 different styles!.

How to get Android Custom Button Shape?

Android Custom Button Shape
Android Custom Button Shape

If you’re someone who would like to create your own android custom button shape and style, here is way you can do. We’ve created a custom button shape and shared its tutorial below!

To achieve this, you’ll have to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>

<shape android:shape="rectangle"

    xmlns:android="http://schemas.android.com/apk/res/android">

    <!--Radius of all four corners-->
    <corners
        android:bottomRightRadius="50dp"
        android:bottomLeftRadius="10dp"
        android:topLeftRadius="50dp"
        android:topRightRadius="10dp"/>

            <!--Stroke size and color-->
            <stroke android:width="3dp"
                android:color="@color/colorAccent" />

            <!--Fill Color of the Button-->
            <gradient android:angle="-90"
                android:startColor="#000000"
                android:endColor="#000000"  />
        </shape>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

   <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/colorAccent"
        android:textSize="17sp"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:paddingStart="25dp"
        android:paddingEnd="25dp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note:

  • In case you would like to change the button color, you’ll have to change the android:startColor=”#00000000″ and android:endColor=”#00000000″ attribute in rounded_rectangle.xml file.
  • In case you would like to change the stroke size, you’ll have to change the android:width=”3dp” attribute.
  • To change the shape of button you’ll have to change the following attributes!
<corners
android:bottomRightRadius="50dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="50dp"
android:topRightRadius="10dp"/>

Interested in adding more customization to your button? See here Android Button Design, 6 new Style!

Android Button Design, 6 New Styles!

android imageview

Android Button Design Blog is written keeping in mind Material Design guidelines.

Button Widget in an Android App plays a very important role in user interaction. It prompts user to interact with the app and brings more meaning to app design.

Here are 6 different android XML files that you can use as reference for android button design in your app.

1. Android Button Basic Design

We have used Android constraint layout in the following example.

Android Button Design
Android Button Design

To achieve this basic design style, write following lines of code:

<Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/white"
        android:textSize="17sp"
        android:padding="20dp"
        android:textAllCaps="false"
        android:backgroundTint="@color/colorAccent"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

2. Android Button Rounded Rectangle Design

Android Button Design
Android Button Design

To achieve a rounded rectangle design as shown above, you’ve to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp">

    <solid android:color="@color/colorAccent"/> <!-- this one is the color of the Rounded Button -->

    <corners
        android:bottomRightRadius="10dp"
        android:bottomLeftRadius="10dp"
        android:topLeftRadius="10dp"
        android:topRightRadius="10dp"/>

</shape>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

<Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/white"
        android:textSize="17sp"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:paddingStart="25dp"
        android:paddingEnd="25dp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note: In case you would like to change the button color, you’ll have to change the shape color attribute in rounded_rectangle.xml file or add android:backgroundTint attribute to ‘Button’ widget!

3. Rounded Design

Android Button Design
Android Button Design

Rounded Design looks quite good. In order to achieve this style you’ll have to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <corners android:radius="50dp"/> // if you want clear round shape then make radius size is half of your  button`s height.

    <solid android:color="@color/colorAccent"/> // Button Colour
    <padding
        android:bottom="10dp"
        android:left="25dp"
        android:right="25dp"
        android:top="10dp"/>

</shape>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

 <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/white"
        android:textSize="17sp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note: In case you would like to change the button color, you’ll have to change the shape color attribute in rounded_rectangle.xml file or add android:backgroundTint attribute to ‘Button’ widget!

4. On Press Change Color

Android Button Design
Android Button Design

If you like to add more colors to your Android Button Design, you can add state_focused and state_pressed to your Android Button widgets and change color of your button whenever user presses the button.

To achieve this, you’ll have to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true" >
        <shape android:shape="rectangle"  >

            <corners android:radius="12dp" />

            <stroke android:width="1dp"
                android:color="#E91E63" />

            <gradient android:angle="-90"
                android:startColor="#E91E63"
                android:endColor="#F44336"  />
        </shape>
    </item>

    <item android:state_focused="true">
        <shape android:shape="rectangle"  >

            <corners android:radius="12dip" />

            <stroke android:width="1dip"
                android:color="#F44336" />

            <solid android:color="@color/colorAccent"/>

        </shape>
    </item>

    <item >
        <shape android:shape="rectangle"  >

            <corners android:radius="12dp" />

            <stroke android:width="5dp"
                android:color="#FF9800" />

            <gradient android:angle="-90"
                android:startColor="#FF9800"
                android:endColor="#FFC107" />

        </shape>
    </item>

</selector>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

   <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/white"
        android:textSize="17sp"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:paddingStart="25dp"
        android:paddingEnd="25dp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note: In case you would like to change the button color, you’ll have to change the shape color attribute in rounded_rectangle.xml file.

5. Empty Button Design

Android Button Design
Android Button Design

One of our favorite, the empty button design style. As shown above, in this button design xml file we have added radius to make button rounded and filled it with the transparent color (” #00000000 “) !

To achieve this, you’ll have to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>

<shape android:shape="rectangle"

    xmlns:android="http://schemas.android.com/apk/res/android">

            <corners android:radius="50dp" />

            <stroke android:width="3dp"
                android:color="@color/colorAccent" />

            <gradient android:angle="-90"
                android:startColor="#00000000"
                android:endColor="#00000000"  />
        </shape>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/colorAccent"
        android:textSize="17sp"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:paddingStart="25dp"
        android:paddingEnd="25dp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note: In case you would like to change the button color, you’ll have to change the shape color attribute in rounded_rectangle.xml file.

6. Custom Button Design

If you’re someone who would like to create your own custom design and style, here is way you can do. We’ve created a custom shape and shared its tutorial below!

To achieve this, you’ll have to first create a new android drawable resource file.

To create this file, in ‘Android’ section of Project Panel on the left, go to app > res > drawable

Right click on ‘drawable’ folder and select ‘New > Drawable Resource File’

Create a new file named ’rounded_rectangle’

In this new file write the following line of code:

<?xml version="1.0" encoding="utf-8"?>

<shape android:shape="rectangle"

    xmlns:android="http://schemas.android.com/apk/res/android">

    <!--Radius of all four corners-->
    <corners
        android:bottomRightRadius="50dp"
        android:bottomLeftRadius="10dp"
        android:topLeftRadius="50dp"
        android:topRightRadius="10dp"/>

            <!--Stroke size and color-->
            <stroke android:width="3dp"
                android:color="@color/colorAccent" />

            <!--Fill Color of the Button-->
            <gradient android:angle="-90"
                android:startColor="#00000000"
                android:endColor="#00000000"  />
        </shape>

Once done, go back to your main xml file which contains the button and add following attribute to it:

android:background="@drawable/rounded_rectangle"

To achieve what we have got in the image above, add following lines of code:

   <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="56dp"
        android:textColor="@color/colorAccent"
        android:textSize="17sp"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:paddingStart="25dp"
        android:paddingEnd="25dp"
        android:focusable="true"
        android:textAllCaps="false"
        android:background="@drawable/rounded_btn"
        android:text="View Reports"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

Note:

  • In case you would like to change the button color, you’ll have to change the android:startColor=”#00000000″ and android:endColor=”#00000000″ attribute in rounded_rectangle.xml file.
  • In case you would like to change the stroke size, you’ll have to change the android:width=”3dp” attribute.
  • To change the shape of button you’ll have to change the following attributes!
<corners
android:bottomRightRadius="50dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="50dp"
android:topRightRadius="10dp"/>

Interested in adding more customization to your button? See here Android Material Loading Button

Android Material Loading Button

Material Loading Button

A configurable and animated material loading button. If you’re an RxJava fan as I am this button will come you really handy.

material loading button

Usage

Minimum SDK: 21

Currently this widget is running with androidX and also allows the usage of databinding to set the elements comfortably.

Gradle

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
 implementation 'com.github.Muki1992:MaterialLoadingButton:1.0'
 }

Indicating the loading progress

fun doStuff(view: View) {
    loadingButton.onStartLoading()
    Handler().postDelayed({
    loadingButton.onStopLoading()
    }, 500)
}

XML

<de.mustafagercek.library.LoadingButton      
   android:id="@+id/loading_button"      
   android:layout_width="match_parent"      
   android:layout_height="wrap_content"      
   app:buttonText="Do stuff"         
   app:onButtonClick="@{(view)->presenter.doStuff(view)}"               
   bind:buttonColor="@{@color/colorPrimary}"/>

Accessing attributes programatically

All custom attributes can be set like below:

loadingButton.setButtonOnClickListener(View.OnClickListener)

loadingButton.setButtonColor(Int)

loadingButton.setTextColor(Int)

loadingButton.setButtonText(String)

License

Copyright 2019 Mustafa Gercek

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Also See: Android Custom Button

Android Jetpack Navigation, Simplifying App Navigation

android jetpack navigation

As mobile app development becomes more complex, it’s essential to simplify navigation for a better user experience. Android Jetpack Navigation is a tool that helps simplify app navigation, making it more intuitive for users. In this article, we will discuss what Android Jetpack Navigation is, how to integrate it into your app, and how to use it to enhance user experience.

android jetpack navigation
android jetpack navigation

1. Introduction

Mobile app users expect intuitive navigation to move around the app quickly. Navigation should be intuitive, accessible, and predictable, regardless of device size, orientation, or user input method. Android Jetpack Navigation is a tool that helps developers create a seamless and intuitive navigation experience in Android apps.

2. What is Android Jetpack Navigation?

Android Jetpack Navigation is a library for implementing navigation in Android apps. It provides a set of components that allow developers to define navigation graphs, destinations, and actions in a visual way, using the Navigation Editor. The Navigation component also handles common navigation actions, such as up and back, automatically, reducing the amount of boilerplate code required.

3. Benefits of using Android Jetpack Navigation

Using Android Jetpack Navigation offers many benefits, including:

  • Simplifies navigation setup: The Navigation component makes it easy to create a navigation graph, define destinations, and add actions.
  • Automatically handles common navigation actions: The Navigation component handles common navigation actions such as up and back automatically.
  • Reduces boilerplate code: The Navigation component generates most of the code required for navigation, reducing the amount of boilerplate code required.
  • Supports deep linking: The Navigation component supports deep linking, making it easy to link to specific destinations in your app.
  • Improves testability: The Navigation component’s architecture is designed to improve testability, making it easier to write unit tests.

4. How to Integrate Android Jetpack Navigation

Integrating Android Jetpack Navigation in your app involves the following steps:

4.1 Adding the Navigation component to your project

To add the Navigation component to your project, add the following dependencies to your app-level build.gradle file:

dependencies {
    def nav_version = "2.3.5"
    implementation "androidx.navigation:navigation-fragment:$nav_version"
    implementation "androidx.navigation:navigation-ui:$nav_version"
}

4.2 Setting up a navigation graph

A navigation graph is an XML resource file that defines the structure of your app’s navigation. To create a navigation graph, follow these steps:

  1. In Android Studio, open the Project pane, then app > res > right-click on the res directory, and select New > Android Resource File.
  2. In the New Android Resource File dialog box, specify the File name as navigation and the Resource type as Navigation.
  3. Click OK to create the navigation XML file.

4.3 Creating navigation destinations

Destinations represent screens or fragments in your app. To create a destination, follow these steps:

  1. In the Navigation Editor, click the + button to add a destination.
  2. Choose the type of destination you want to create (Activity, Fragment, or Custom Destination).
  3. Enter a unique ID for the destination.
  4. Define any arguments that the destination requires.

4.4 Adding navigation actions

Navigation actions define how users move between destinations. To add a navigation action, follow these steps:

  1. In the Navigation Editor, click and hold the starting destination and drag to the ending destination.
  2. In the pop-up menu that appears, select the type of action you want to create (e.g., navigate, pop, or pop to destination).
  3. Enter a unique ID for the action.

4.5 Using Safe Args to pass data between destinations

Safe Args is a Gradle plugin that generates type-safe classes for navigating and passing arguments between destinations. To use Safe Args, follow these steps:

  1. Add the Safe Args plugin to your app-level build.gradle file:
plugins {
    id 'androidx.navigation.safeargs.kotlin'
}
  1. Add arguments to your navigation destinations in the Navigation Editor.
  2. Build your project to generate the Safe Args classes.
  3. Pass arguments between destinations using the generated classes.

5. How to Use Android Jetpack Navigation

There are several ways to use Android Jetpack Navigation to enhance your app’s navigation:

5.1 Setting up a bottom navigation bar

A bottom navigation bar allows users to quickly navigate between top-level destinations in your app. To set up a bottom navigation bar, follow these steps:

  1. In the Navigation Editor, add a bottom navigation view to your layout.
  2. Define your top-level destinations as menu items in the bottom navigation view.
  3. Add navigation actions between your top-level destinations.

5.2 Adding a navigation drawer

A navigation drawer allows users to access app-level destinations and settings from anywhere in your app. To add a navigation drawer, follow these steps:

  1. In the Navigation Editor, add a navigation drawer to your layout.
  2. Define your app-level destinations as menu items in the navigation drawer.
  3. Add navigation actions between your app-level destinations.

5.3 Implementing deep linking

Deep linking allows users to launch your app and navigate to a specific destination using a URL. To implement deep linking, follow these steps:

  1. Add an intent filter to your destination activity or fragment.
  2. Define the URL pattern that should trigger the intent filter.
  3. Parse the URL and navigate to the appropriate destination.

6. Best Practices for Android Jetpack Navigation

To get the most out of Android Jetpack Navigation, follow these best practices:

  • Define your app’s navigation structure before starting implementation.
  • Use a consistent navigation pattern across your app.
  • Use descriptive and unique IDs for your destinations and actions.
  • Keep your navigation graph simple and easy to understand.
  • Use Safe Args to pass arguments between destinations.
  • Test your navigation flow thoroughly.

7. Conclusion

In this article, we have discussed what Android Jetpack Navigation is, how to integrate it into your app, and how to use it to enhance user experience. By simplifying navigation, Android Jetpack Navigation can help you create a better user experience for your app.

8. FAQs

  1. Is Android Jetpack Navigation only for single-activity apps?
    • No, Android Jetpack Navigation can be used in both single- and multiple-activity apps.
  2. Can I use Android Jetpack Navigation with the support library?
    • Yes, Android Jetpack Navigation is compatible with the Android Support Library.
  3. Can I use Android Jetpack Navigation with the old ActionBar?
    • Yes, Android Jetpack Navigation can be used with the old ActionBar as well as the newer Toolbar.
  4. Can I use Android Jetpack Navigation with dynamic feature modules?
    • Yes, Android Jetpack Navigation is compatible with dynamic feature modules.
  5. Can I use Android Jetpack Navigation with Kotlin?
    • Yes, Android Jetpack Navigation has full support for Kotlin.

Android Intent Flags: Everything You Need to Know

android intent flags

Android Intent Flags are used to signify the state or type of an Android Intent. Android Intent flags are set using the Android Context.putExtra() method and can be retrieved using the getFlags() method on the Android intent object.

android intent flags
android intent flags

They allow you to be very specific about the actions you want your app to take and can help avoid ambiguity. There are different types of Android Intent Flags which will be explained in this blog post with examples.

Introduction: Android Intent Flags

Android Intent Flags are a set of special bits that you can set on an Intent to change its behavior. They allow you to control things like whether the Intent should start a new activity, or whether it should return results.

How to Set Android Intent Flags

You can set an Android Intent Flag by using the Android Context.putExtra() method. This method takes two arguments: the flag you want to set, and a value (usually true or false) that indicates whether the flag should be set.

Type of Android Intent Flags

FLAG_ACTIVITY_NEW_TASK

If set, this activity will become the start of a new task on this history stack. A task (from the activity that started it to the next task activity) is a sequence of activities that share the same root activity. This flag is generally used by activities that provide a “home” button to the task, such as an email application.

FLAG_ACTIVITY_CLEAR_TOP

If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent. (e.g. document browsing where clicking on a listed document would lead to viewing that document, possibly in another activity).

If FLAG_ACTIVITY_NEW_TASK is also set, the task containing this activity will be brought to the foreground and given focus instead of being created from scratch. Otherwise, a new task will be created for it. This flag can not be used when the Intent’s target is within your own task; if so, no changes will happen (and you will receive an “IllegalArgumentException”).

FLAG_ACTIVITY_SINGLE_TOP

If set, the system will not create a new instance of the activity if it is already running at the top of the current task. However, if an instance would be created in a separate task, that instance is still brought to the front and receives the new intent, resulting in two instances running side-by-side in different tasks.

This is generally used only with activities that are part of a tabbed UI; using this flag with those activities allows each tab to have its own unique history stack maintained by Android, rather than having all tabs share one history stack. This flag is not set by default.

FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET

If set in an Intent passed to Context.startActivity(), this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started. That is, the activity becomes the new root of an otherwise empty task, and any old activities are destroyed. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK; if it is not set, then a new instance of the activity will be added to an existing task as usual.

If it is set, and Android encounters the same class when restoring a task, it will instantiate a new instance of that class and deliver the Intent to that instance through its onNewIntent() method (instead of simply delivering the Intent to the existing instance as is normal behavior).

This means you must set this flag when you want a new instance created; if not set, Android may instead use your existing Activity. Note also that this flag will cause any activities under the old task root to be destroyed when the last activity in them is finished or becomes empty (due to back navigation away from them), since they are no longer part of an active task.

FLAG_ACTIVITY_NEW_DOCUMENT

Added in API level 21. If set, and this activity is launching in a new task, the system will not launch any activities in between the caller and this one. In other words, a new activity stack will be generated for this one through FLAG_ACTIVITY_TASK_ON_HOME. This is like saying all of those launched activities are “transparent” (they aren’t really; Android is just not going to keep track of them). Then, when the user presses Back from this activity, they will go back to the home screen, with no trace of the called-upon activity remaining.

FLAG_ACTIVITY_MULTIPLE_TASK

Added in API level 21. If set, and this activity is launching in a new task, the system will launch the top activity in an existing task with the same Affinity as if FLAG_ACTIVITY_NEW_TASK was used.

That is, Android will look for an existing task with the same affinity to re-use before it creates a new one. This is useful when activities are part of a document flow, where some activities should only exist within that document (e.g. details pages) and others should be reachable from anywhere else within the app (e.g. browse or search).

Note that this flag must be set on all activities that can appear under these circumstances; setting it on just one activity in a task may result in lost user data as Android fails to correctly restore state when going back.

Learn more about Intent Service in android from link here

FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET

Added in API level 11. If set in an Intent passed to Context::startActivity(), this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started. That is, the activity becomes the new root of an otherwise empty task, and any old activities are destroyed to make way for it. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK; if it is not set, then a new instance of the activity will always be created (as normal) even if there is an existing task running.

FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY

Added in API level 11. If set in an Intent passed to Context::startActivity(), this flag indicates that the caller wants the activity to be launched as if it was launched from history (its task with all previous activities will be re-created and the activity will be placed on top). That is, generally speaking a new instance of the activity will not be created. This flag can not be used when the Intent’s target is within your own task; if so, no changes will happen (and you will receive an “IllegalArgumentException”).

Conclusion

Android Intent Flags are powerful tools that can help you control the behavior of your app. Use them wisely to avoid ambiguity and to get the most out of your Android app development!

Constraint Layout in Android: What is It and How Does It Compare to Other Layouts?

constraint layout in android

What is constraint layout in Android? How does it compare to LinearLayout and RelativeLayout? In this blog post, we will answer all of these questions and more.

Constraint layout is a relatively new layout type that was introduced with Android Studio 3.0. It offers many advantages over other layout types, including increased flexibility and performance. We will also show you how to use constraint layout in your own projects!

What is Constraint Layout in Android?

So, what exactly is constraint layout? Constraint layout is a type of layout that allows you to position and size widgets in a flexible way. Unlike LinearLayout and RelativeLayout, which are both restricted to two dimensions, constraint layout can be used in three dimensions. This means that you can create complex layouts with ease!

One of the biggest advantages of constraint layout is its performance. Because it doesn’t have to rely on nested view groups, it can often avoid the common performance issues that plague other layouts. In addition, constraint layout is much more flexible than other types of layouts. This flexibility comes at a cost though; because it’s so flexible, constraint layout can be more difficult to use than other layouts. Nevertheless, we think it’s worth the effort!

If you’re ready to learn more about constraint layout, then head on over to our tutorial on how to use constraint layout in Android Studio. We’ll show you everything you need to know, from creating a basic layout to adding constraints and making your layout responsive. Trust us, once you get the hang of it, you’ll never want to go back to using anything else!

How to Use Constraint Layout in Android

Now that we’ve talked about what constraint layout is, let’s learn how to use it in Android Studio. Constraint layout is a powerful tool, but it can be tricky to use if you’re not familiar with it. That’s why we’ve put together this tutorial on using constraintlayout in Android Studio.

We’ll walk you through everything from creating a basic layout to adding constraints and making your layout responsive. By the end of this tutorial, you’ll be an expert at using constraintlayout! So let’s get started.

Creating a New Project in Android Studio

First, open Android Studio and create a new project. We’ll call our project “ConstraintLayoutExample“. Once you’ve created your project, open the activity_main.xml file and delete the default TextView. We won’t be needing it for this example.

Next, drag a Button widget from the Palette into the design editor. Position it in the center of the screen and give it a label like “Click me!”. Your layout should now look something like this:

Constraint Layout in Android example
Constraint Layout in Android example

Adding Constraints

Now that we’ve talked about what constraint layout is and how it compares to other layouts, let’s learn how to use it in Android Studio! First, add the following dependency to your build.gradle file:

dependencies {
     implementation 'com.android.support.constraint:constraint-layout:x.y.z' // Replace with the latest version!
}

Next, open your activity_main.xml file and add the following code

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android">

        <Button
            android:id="@+id/button"
            android:text="Sample button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

Now that we’ve added the constraint layout, let’s add some constraints to our Button! We want our Button to be horizontally and vertically centered in the screen, so we’ll add constraints for both the left and right sides of the Button, as well as the top and bottom.

To do this, select your Button in the design editor. Then, click on the “Infer Constraints” button in the toolbar. This will automatically generate constraints for your view. Alternatively, you can also hold down the “Shift” key while dragging from one side of the view to another to create constraints.

Once you’ve added your constraints, your layout should look something like this:

constraint layout in android
constraint layout in android
<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Sample button"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

If everything looks good, go ahead and run your app! You should see your Button appear in the center of the screen. Congratulations, you’ve just created your first constraint layout!

Making Your Layout Responsive

One of the great things about constraint layout is that it makes it easy to create responsive layouts. To see how this works, let’s add another view to our layout.

This time, we’ll add an ImageView and position it below our Button. We want the ImageView to be horizontally centered and have a margin of 16dp from the top and bottom of the screen.

Adding Constraints

To add constraints to our ImageView, select it in the design editor and click on the “Infer Constraints” button in the toolbar. Then, add a margin of 16dp from the top and bottom of the screen. Your layout should now look something like this:

imageview constraint layout in android
<?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">

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Sample button"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginTop="16dp"
        android:src="@drawable/ic_launcher_background"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/button" />

</androidx.constraintlayout.widget.ConstraintLayout>

If you run your app on a device with a large screen, you’ll see that the ImageView is centered in the middle of the screen. However, if you run your app on a device with a smaller screen, you’ll see that the ImageView is moved to the top of the screen and centered there. This is because we’ve added constraints for the top and bottom of the ImageView, so when there’s not enough space to display both views side by side, Android will move the ImageView above the Button.

Adding Constraints for Orientation Changes

Now let’s say we want our Button to be below our ImageView when we change the orientation of our device. To do this, we need to add a constraint for the left side of the Button and remove the constraint for the top side.

Adding Constraints

If you run your app on a device with a large screen, you’ll see that the Button is still centered in the middle of the screen. However, if you change the orientation of your device to portrait mode, you’ll see that the Button is now below the ImageView.

This is because we’ve added a constraint for the left side of the Button, so when there’s not enough space to display both views side by side in landscape mode, Android will move the Button below the ImageView.

Constraint Layout vs Linear Layout in Android

Now that we’ve talked about what constraint layout is, let’s compare it to another popular layout type: LinearLayout. LinearLayout is the most basic type of layout in Android, and it arranges its children in a single column or row. This can be useful for simple layouts, but it quickly becomes limiting as your layout becomes more complex.

In contrast, constraint layout gives you much more control over how your widgets are arranged. With constraintlayout, you can position widgets anywhere on the screen, not just in a single column or row. You can also specify constraints between widgets, so that they resize and move together as the user resizes the screen. This is perfect for creating responsive layouts!

So which one should you use? If you need a simple layout, then LinearLayout is probably all you need. But if you want more control over your layout, or if you need to create a responsive layout, then constraintlayout is the way to go.

Constraint Layout vs Relative Layout in Android

Another popular layout type is RelativeLayout. RelativeLayout lets you position widgets relative to one another, or to the parent layout. This can be useful for certain types of layouts, but it can also be confusing and difficult to get right.

In contrast, constraintlayout gives you much more control over how your widgets are arranged. With constraintlayout, you can specify constraints between widgets, so that they resize and move together as the user resizes the screen. This is perfect for creating responsive layouts!

So which one should you use? If you need a simple layout, then LinearLayout or RelativeLayout might be all you need. But if you want more control over your layout, or if you need to create a responsive layout, then constraintlayout is the way to go.

Constraint Layout vs Other Layout Types in Android

There are many other types of layouts in Android, but constraintlayout is definitely one of the most popular. This is because constraintlayout gives you much more control over how your widgets are arranged. With constraintlayout, you can specify constraints between widgets, so that they resize and move together as the user resizes the screen. This is perfect for creating responsive layouts!

So if you need a layout that is flexible and easy to use, then constraintlayout is definitely the way to go.

And that’s it! You now know how to use constraint layout to create responsive layouts for your Android app. For more information on constraint layout, be sure to check out the official documentation. Thanks for reading!

I hope this helped you understand Constraint Layout a little better.

Learn more about Constraint layout from link here

Please leave any questions in the comments section below and I’ll do my best to answer them.

Happy coding!

Android Cache Cleaner Apps to Speed Up Your Phone | 15 Best for 2022

Android Cache Cleaner

If your Android phone is feeling a little sluggish, you may need to clean out the cache. This can be done with one of the many android cache cleaner apps that are available. In this blog post, we will list 20 of the best android cache cleaner apps. We will also discuss how to use these apps and what benefits they offer. So if your Android phone needs a speed boost, be sure to check out this blog post!

Android Cache Cleaner
Android Cache Cleaner

What are the benefits of Android Cache Cleaners?

Each android cache cleaner app has different features and benefits. Some common features include the ability to delete junk files, clear the RAM, and boost your phone’s speed. However, each app has different benefits, so be sure to read the descriptions before downloading!

Another benefit of using an android cache cleaner is that it can improve your phone’s performance. As we mentioned before, these apps can delete junk files and clear the RAM. This will help your phone run smoother and faster. If you are someone who uses their phone for work or gaming, then an android cache cleaner is a must-have!

The last benefit of using an android cache cleaner is that it can free up storage space. These apps can delete junk files, temporary files, and unused apps. This will help you save space on your phone so you can store more important things like photos and videos. If you are someone who is always running out of storage, then an android cache cleaner is a must-have!

There are many android cache cleaners available on the Google Play Store. However, not all of them are created equal. That’s why we’ve put together a list of the 20 best android cache cleaners to help you choose the right one for your needs.

How to use android cache cleaners?

Android cache cleaners are pretty simple to use. Just download and install one of the android cache cleaner apps from the list below, open it up, and hit the “Clean” button. Some android cache cleaners will also give you the option to delete other types of junk files from your phone, like temporary internet files or unused app data.

If your phone has been feeling a bit sluggish lately, give one of these android cache cleaners a try. You may be surprised at how much faster your phone feels after getting rid of all that junk data.

Download Android APKs directly from link here!

Here are the 20 best android cache cleaners:

Super Phone Cleaner – Cache Cleaner

super phone cleaner

Super Phone Cleaner is a popular android cache cleaner app with over 50 million downloads. It is a free app that cleans junk files, temporary files, and unused apps to free up storage space on your android device.

Arming with CPU cooler, Phone cleaner can optimize the phone with the help of battery saver, super cleaner and power clean. Fast RAM cleaner, junk cleaner master and powerful app cache cleaner can improve your phone. RAM booster and junk notification cleaner also make their contribution in optimizing the phone.

Phone Cleaner is all in one clean android master and phone booster toolbox.

Avast Cleanup – Phone Cleaner

Avast Cleanup – Phone Cleaner
Avast Cleanup – Phone Cleaner

Avast Cleanup is a highly effective cache and junk cleaner app for Android that lets you master your device’s performance, memory, and more.

Remove leftover files and unused apps with a simple tap for a faster, more powerful phone. Avast Cleanup optimizes your phone’s performance and boosts its speed by removing junk from your mobile.

An in-depth scan of your device’s storage, offering powerful junk and file cleaning, as well as useful performance-improving tips and opportunities.

The app comes with a premium subscription with which you can have following benefits:

  • Advanced Photo Optimizer: master the size and quality of your optimized photos using a comparison view to help select the right settings for you.
  • Hibernation mode: Hibernate apps to extend battery life and speed up your phone
  • Automatic Cleaning: let Cleanup run regular cleanings without interrupting you to keep your device running fast at all times.
  • Deep Clean — Find and safely delete hidden cache.
  • Remove Ads: eliminate ads from your Cleanup experience.
  • Avast Direct Support: contact Avast directly from the app to receive fast responses to your inquiries.

Ancleaner, Android cleaner

ancleaner phone cache cleaner

Ancleaner is the Android cleaner and free cleaner. It is a phone cleaner and smart cleaner. Its is a cleaning app for Android, booster app, memory ram cleaner, phone cleaner, cache cleaner, phone booster, whatsapp tool, basic explorer and more! It cleans the junk from Android phone. It can speed up your phone, clean junk files and stop battery draining.

Following are some noteworthy features of this app:

  1. Phone Cleaner. You can clean junk (cache cleaner & memory ram cleaner) to boost your phone.
  2. App Manager. Uninstall apps from your phone in one click.
  3. Basic explorer. Basic file organizer and explorer by category: Images, music, videos, documents. It is a junk file cleaner for android mobiles.
  4. RAM memory cleaner. Best speed and phone booster. Clean up ram space and boost your phone performance.
  5. Ancleaner tech.It will select what and what not to delete or optimize. It will not delete files which you need.


KeepClean: Cleaner, Antivirus

keep android cache Cleaner

KeepClean – Phone Cleaner & Phone Antivirus & Phone Booster, the most reliable all-in-one phone cleaner & booster app for free on Google Play. With over1 billion downloads worldwide, KeepClean has become the No.1 phone cleaner app choice overall.

KeepClean can scan your phone for junk files and virus, and cleans and speeds up your phone in one click. It’s very easy and completely free! .

What you should know about KeepClean?

⭐ Besides being a super Phone Cleaner App, KeepClean can also be used as:

✔ Phone Cleaner App,
✔ Phone Booster App,
✔ Phone Antivirus App,
✔ Phone Battery Fast Charging App,
✔ Phone Spam Blocking App,
✔ Phone Mobile Game Booster App,
✔ Phone Memory Freeing App,
✔ Phone Battery Protection App,
✔ Phone Privacy Protection App,

Why Choose KeepClean?
⭐ With multiple privacy protectors to protect your phone security & your privacy, KeepClean can fully speed up your phone performance & save your battery.

⭐KeepClean is a professional phone cache cleaner. KeepClean detects useless files, application cache, system cache, uninstalled apk in your phone and cleans them up.

⭐KeepClean frees up and optimizes the storage space of your phone.

✔ Cache Cleaner: Clean up cache generated by the browser and other mobile apps
 Antivirus:Scans for virus on phone, blocks and removes virus to keep safe
✔ Files Cleaner:Clean up the junk files generated during the operation of the phone
✔ Residual Cleaner: Clean up residual file due to incomplete deletion
✔ Memory Cleaner: Regularly release the phone memory occupied by app running
✔ RAM Cleaner:Clean up the RAM space taken up by running the phone
✔ System Cache Cleaner: Regularly clean up the system cache generated by the phone
✔ Apps Cleaner: Clean up app junk that is automatically saved or loaded while the phone is running
✔ Other Super Cleaner: Video junk file cleaner, Audio junk file cleaner, Image junk file cleaner, game junk file cleaner, and identification and removal of illegal junk files.

⭐ KeepClean can be used as an all-in-one butler for your phone to help you optimize your phone’s running speed and protect your Android phone.

Keep Clean Features:

🚀JUNK (JUNK FILES) CLEANER
KeepClean helps free up your storage space by removing junk, residual, and cache files which slows down your phone.

With our professional cleaner, you can also free up much more space from cleaning cache data from social apps without worrying about deleting the wrong files.

🚀FREE ANTIVIRUS
Scans for viruses on all apps (pre-installed or not), blocks and removes viruses to keep your phone safe from viruses, trojans and protects your privacy with the free antivirus engine of KeepClean!

🚀MOBILE BOOSTER
KeepClean helps speed up the phone by freeing up RAM. After boosting your mobile, you can run a speed test to see how much faster it is.

🔋BATTERY SAVER
KeepClean helps to save battery power and extend its life by hibernating running apps.

🚀CPU Cooler
CPU Cooler engine of KeepClean can help cool down your android phone CPU temperature with just one tap.

🔥Other Cleaner Engine
The user interface of Keep Clean is simple and intuitive, making it user-friendly and easy to clean cache and junk files to free up your phone’s RAM.

Files by Google – Apps on Google Play

Files by Google android cache Cleaner

Files by Google is a Google made free Android cache cleaner app with over 100 million downloads. It is an effective app that cleans junk files, temporary files, and unused apps to free up storage space on your android device.

Its a 3 in 1 app that does the following thing:

  • Free up space – Clean junk files and cache, boost your mobile phone or tablet as you clean up the phone memory, and optimise your smartphone performance.
  • Find files fast – Browse your storage and find everything fast without being an expert in file management.
  • Share files – Send pictures, share videos, transfer large files or app APKs. All of this with super-fast speed up to 480 Mbps over an encrypted, direct Wi-Fi network.

The app comes with following features:

1.Free up Space
In just a few taps, you can free up space more quickly and easily than ever: delete old photos and memes from chat apps, remove duplicate files, delete unused apps, clear your cache and more.

2. Monitor Storage
Use Files to see how much free space is left on your phone and SD card. Easily transfer files to an SD card to free up your phone’s storage, straight from the app. Or use the integrated file cleaner to get more space on the phone.

3. Complete customization
You will always know what you’re deleting; we don’t hide behind complicated terms and phrases. Select only what you want to remove and keep the rest. It’s your photos, your videos and your files, so you are in charge.

4. Boost Phone’s Performance
Use Files to keep enough memory, so that your phone keeps running smoothly. You get regular prompts to remove junk or temporary files, which helps you get more storage immediately.

5. Smart AI Recommendations
Get helpful suggestions of files to delete before you run out of space. The recommendation from the Files app gets smarter the more that you use it.

6. Find Files Faster
Save time looking for photos, videos and documents on your phone. Files uses filters rather than folders so your stuff is organised more intuitively. Files by Google is the file manager and storage browser that helps you find what you’re looking for fast.

7. Easy File Management
Search for your files or simply navigate to them through categories and filters. View, delete, move, rename or share any files. Sort them by file size to understand what’s taking up space. Browse all the GIFs that you have. Find and share that video that you downloaded last week. All of this with a few taps.

8. Share files offline
Share your pictures, videos, documents or apps with others nearby who also have the app. With fast speed up to 480 Mbps, it’s fast, free and it works without the Internet, so it doesn’t cost mobile data. Just pair up your phone with anyone nearby who has the Files app.

9. Encrypted File Sharing
Files’ offline file sharing is secured with WPA2 encryption, providing a more secure file transfer. Files app uses Bluetooth to set up encrypted and direct, fast Wi-Fi connection, so that you can transfer app APK or large files in seconds, and send videos or pictures to your friends. Safe and secure.

10. Back up files to the Cloud
If you want to keep a file forever, select it from the Files menu and back it up to Google Drive or any other cloud storage app. Save them forever without using space in your phone.

11. Backup files to SD Card
If you run out of storage on your phone, simply transfer large files or videos to your SD card if you have one. With a few clicks, you can clean up your phone and fully use the SD card. That leaves your internal storage free and your phone faster.

12. Better Storage Management
Files app uses less than 10 MB of storage on your phone. And there’s no malware or bloatware to affect your phone’s performance.

SD Maid – System Cleaning Tool

SD Maid Phone cleaner

SD Maid is a paid android cache cleaner app with over 10 million downloads. It is an effective app that cleans junk files, temporary files, and unused apps to free up storage space on your android device.

SD Maid allows you to:

  • Browse your whole device and manipulate files through a full-fledged file explorer.
  • Remove superfluous files from your system.
  • Manage installed user and system apps.
  • Detect files formerly belonging to uninstalled apps.
  • Search for files by name, content or date.
  • Obtain a detailed overview of your devices storage.
  • Optimize databases.
  • Do actual app cleaning and remove expendable files, which supersedes what others may call ‘cache cleaning’.
  • Detect duplicate pictures, music or documents, independent of name or location.
  • Run tools automatically on a schedule or via widgets.

Nox Cleaner

NOX android cache Cleaner

Being trusted by more than 50 million users, Nox Cleaner is one of Google Play’s most effective phone cleaner. If your phone storage is insufficient or slowing down, Nox Cleaner totally can clear junk files, remove cache, release storage space hence boosting phone performance and speed.

Why Choose NOX Cleaner?
  • Equipped with advanced mechanisms such as cache cleaner, junk cleaner, storage cleaner, memory cleaner, ads cleaner, Nox Cleaner could improve not only phone storage space but also phone performance as well.
  • A powerful and effective antivirus system with a virus scanner, virus removal, and virus protection helps Android users protect devices from any potential security threat or privacy vulnerability.

What are some features of NOX Cleaner?

🔥Max Junk File Cleaner
With our powerful analytics engine, users will not only get more storage space from the cleaning process of cache, residual files, download folders, clipboard content and more; users can also delete cache data from social apps such as Line, WhatsApp or others without worrying about deleting the wrong file. One-touch & cache with junk files will be cleaned!

👿Real-Time Master Antivirus
Nox Cleaner will do the real-time virus scan including malware, adware, online trojans, and remove viruses with potential privacy threats, hence protect users against all the threats that can damage your phone. One tap then your phone is secured against all the potential viruses threatening your privacy!

🚀Max Memory Booster
The excessive use of memory makes your phone heavy & slow. With just one click, Nox Cleaner can free up memory & make phone lighter & faster. Nox Cleaner works smartly, hence make the experience on Android phones more comfortable.

❄️CPU Cooler Master
Nox Cleaner intelligently detects and closes battery-draining apps to reduce CPU usage hence lowering phone temperature which helps users a lot when watching videos or playing games.

🔕Notification Blocker Master
Powered by Nox Cleaner Notification Blocker’s latest calculating engine, useless notifications will be blocked smartly and gathered in one place for quicker and more effective cleanup effect. Activate Notification Blocker to protect messages from peeping and keep the notification bar clean hence boost the phone faster.

🎲Game Booster Master
Boost your favorite games such as Free Fire, PUBG or others and enjoy max speed with lag-free gaming experience. Try NoxCleaner’s Game Booster shortcut to get your games run faster, smoother and slay all the enemies blocking your way to the victory.

🔋Max Battery Saver
By analyzing battery usage status and helps to find battery-draining apps automatically and stop them efficiently.

📦App Manager Master
Nox Cleaner provides information on apps that are not used based on usage. You can manage and uninstall apps that are rarely used to provide more storage space that can speed up Android storage & speed at maximum.

📷Image Manager Master
Nox Cleaner can analyze photo gallery and sort them into different albums where the users can see similar photos to delete.

🔐App Locker Master
App Locker provides users with the utmost security from unwanted access to Facebook, Instagram, or even Gallery, Calls or Messages. Lock app easily & quickly with Pattern, Fingerprint, and passcode!

Ace Cleaner

Ace Cleaner

Ace Cleaner, a simple tool to restore your phone to its best status.

Its features are as follows:
🚀Junk Clean: Find and clean junk files.
🚀Phone Booster:Free up RAM and clean background tasks.
🚀CPU Cooler: Cool down your phone temperature.
🔋Battery Saver: Spot and stop the power-consuming applications.

1Tap Cleaner

1Tap Cleaner

1Tap Cache Cleaner helps you to get more free space for the internal phone storage by clearing apps cached files, data files. If you have selected to launch apps by default for some actions. Defaults Cleaner helps you to clear the default settings. SD Cleaner helps to delete junk files from the SD card.

Some of its features are as follows:

  • 1-tap to clear all cached files
  • list all default apps and clear selected defaults
  • home screen widget shows cache and available size
  • auto clear all cache and history at a specified interval
  • auto clear cache when the device is low on internal storage space
  • clear cache or history for a specified application
  • notify if apps used cache size large than you specified value
  • list applications by either cache, data, code, total size, or app name
  • view application on Market
  • uninstall application
  • open application
  • show application details page

Pro Power Clean – Phone cleaner

Pro Power Clean -android cache Cleaner

Pro Power Clean is a light, fast & smart android phone cleaner and booster app that cleans phone memory and storage space with simply 1 tap. Its a speed optimizer for Android. It integrates advanced junk cleaner engine & super fast cleaners.

Smart phone cleaner and booster – 1 tap boost & auto clean phone memory and storage space.

Clear cache junk on Phone – system cache cleaner and clean cache creek app junk.

Advanced memory cleaner (boost) – cleaning junk files & optimize storage in depth With Deep Clean Function

Smart Phone Cleaner – Speed Booster & Optimizer

Smart android cache Cleaner

Smart Phone Cleaner is an all-rounder app for Android devices. It boosts and optimizes the performance of your Android Phone.

Its noteworthy features are as follows:

  • Free and Easy to use android Phone cleaner & Optimizer
  • Junk Files Cleaner : App Cache and Junk Cleaner
  • Duplicate Files Cleaner : Delete Duplicate Files and recover phone storage space.
  • Malware Protection : Antimalware protects your phone device against Malware attacks and infections
  • Private Browser : It assures that it does not save browsing history, cookies & cache or any other information filled online
  • App Lock : Fast App Locker with Pattern & Passcode to lock any application.
  • CPU Cooler : Cooling CPU temperature to speedup phone performance.
  • File Explorer : File Manager helps you organize and manage all your files in categories in one place.
  • Hibernate Apps : where in apps that lead to battery drainage are hibernated and puts your device in a low power state.
  • Game Speedup : It frees up RAM to give your phone a significant speed boost. Also, it closes background running processes to enhance gaming performance.
  • App Manager : uninstall and disable apps to recover space and speed up your Android Phone.
  • Battery Saver : Smartly analyze your phone’s battery usage and terminates apps that cause battery drainage.
  • One tap RAM booster, cache & temp files cleaner

All-In-One Toolbox: Storage/Cache Cleaner, Booster

All-In-One Toolbox: Storage/Cache Cleaner, Booster

All-In-One Toolbox is a paid android cache cleaner app with over 10 million downloads. All-In-One Toolbox is a set of basic useful tools which help your Android working the best that it can. All handy tools on one small-size app.

All-In-One Toolbox gives a collection of tools such as a junk cleaner, history eraser, speed booster, memory optimizer, battery optimizer, CPU cooler, app manager, file manager, mini launcher just to name a few to maintain good performance for your Android.

It is also compatible with a lot of plug-ins like app lock, game booster, volume settings and so much more.

AVG Cleaner

AVG Cleaner

AVG Cleaner is a free android cache cleaner app with over 50 million downloads. It is an effective app that cleans precious memory and space, save battery power and help boost performance speed!

Some quick features of this app are as follows:

  1. Get more space – clean junk, cache files, memory, unwanted apps and bad & similar photos
  2. Get more power & boost – optimize and extend battery life
  3. Set & forget – receive customizable reminders to clean your device

CCleaner – Cache & RAM cleaner

CCleaner – Cache & RAM cleaner

CCleaner is a free android cache cleaner app with over 100 million downloads. It is an effective app that cleans junk files, temporary files, and unused apps to free up storage space on your android device.

Some features of CCleaner Cache and RAM cleaner app are as follow:

Optimize, Clean, and Master
● Speed up your phone and clean junk safely
● Clean application cache, download folders, browser history, clipboard content and more

Reclaim Storage Space
● Streamline your Android smartphone or tablet
● Quickly and easily uninstall multiple unwanted applications
● Free up valuable storage space on your device
● Clear junk, such as obsolete and residual files
● Analyze and optimize your storage space with Storage analyzer

Analyze Applications’ impact
● Check which apps consume your data
● Find apps draining your battery
● Discover unused apps with App Manager

Speed up your Device
● Quickly stop running tasks and clean memory with Task Killer (RAM Booster)
● App Hibernation feature will stop apps from running in the background until you manually open them

Easy to Use
● Optimize your Android in just a few clicks
● Simple, intuitive user interface which is easy to navigate
● Fast, compact and efficient with low RAM and CPU usage
● App Stats feature lets you quickly determine the overall impact of individual apps on your device

Monitor your System
● Check the usage of your CPU
● Master your RAM and internal storage space
● Check out your battery levels and temperature

Phone Master – Junk Clean Master

Phone Master –Junk Clean Master

Phone Master–Junk Clean Master is an android cache cleaner app with over 100 million downloads. It is an effective app that cleans junk files and Speed Booster, has Applocker, Data Manager, Junk Cleaner for android, CPU cooler & Battery Saver and comes with Virus cleaner.

Why Choose Phone Master?

1. With powerful clean engine: Cache Cleaner, Junk Files Cleaner, Residual Cleaner, Memory Cleaner, RAM Cleaner, System Junk Cleaner, Apps Cleaner, & other super cleaner. can fully speed up your phone performance & save your battery
2. With multiple privacy protector to protect your phone security & your privacy