How to make quote android app with java and make money in less than 45 minutes?

How to make quote android app with java and make money in less than 45 minutes? How to Create an Android App With Android Studio?




Today we will learn How to create quotes android app for beginner using android studio and java:


No PROGRAMMING knowledge required for this lesson, I will use the very simplest way to create this quote android app so everyone can be able to follow me step by step for this tutorial, Let’s Start.


Step One:

If you doesn’t have Java JDK or android studio in your Pc so the first step is download and install both of them You can download JDK from HERE, and also download Android Studio from the official website HERE
Also watch this tutorial to make sure that you did everything correctly From HERE  or Use orcale official turorial HERE


Install android studio and download SDK HERE

Download android studio emulator just in case you haven’t real android studio device to run your app on it, if you have android device Skip the emulator step because real Android Device is away faster than Android Emulator



Step two:

Off course it will be open Android studio, if this is your first time opening android studio, You may be a little confused Don’t worry I’M HERE to help you

Don’t bather yourself by learn everything about android studio in just one lesson.

Android Studio is just a tool, but it’s very helpful and intelligent IDE and step by step you will learn more about it.

What is necessary at this point is starting our journey in learn by doing.



 

Step Three:

Stop talking, let’s make our hands Dirty

Watch this video and follow me:



Resources used in this video: HERE

App source code :

MainActivity(java) and activity_main(xml):

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

137
package com.esoapps.stevejobsquotes;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.TextView;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;

import de.hdodenhof.circleimageview.CircleImageView;

public class MainActivity extends AppCompatActivity {

    private CircleImageView circleImg;
    private TextView quoteTv;
    private CircleImageView nextCircleImg;
    private AdView mAdView;

    //0-first
    //1-second
    //2-third
    private String[] quotes={"Hope is being able to see that there is light despite all of the darkness",
            "There was never a night or a problem that could defeat sunrise or hope",
            "Let your hopes, not your hurts, shape your future",
            "I think it’s a mistake to ever look for hope outside of one’s self",
            "Hope is the only bee that makes honey without flowers",
            "Hope fills the holes of my frustration in my heart",
            "A whole stack of memories never equal one little hope",
            "He who has health, has hope; and he who has hope has everything",
            "To live without hope is to cease to live",
            "The miserable have no other medicine but only hope"};//index 9 //array length 10



    private int index=0;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //HIDING OUR ACTION BAR
        getSupportActionBar().hide();

        setContentView(R.layout.activity_main);

        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
            }
        });



        //link our ui
        circleImg=findViewById(R.id.circleImg);
        quoteTv=findViewById(R.id.quoteTv);
        nextCircleImg=findViewById(R.id.nextCircleImg);

        mAdView=findViewById(R.id.adView);

        AdRequest adRequest = new AdRequest.Builder().build();
        mAdView.loadAd(adRequest);



        //here we listen to user clicks
        nextCircleImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                //quoteTv.setText("Hope is being able to see that there is light despite all of the darkness");

                AlphaAnimation animation=new AlphaAnimation(0.0f,1.0f);
                animation.setDuration(1000);//HALF OF SEC
                //80/100 sec

                animation.setRepeatCount(0);
                animation.setRepeatMode(0);

                quoteTv.startAnimation(animation);

                animation.setAnimationListener(new Animation.AnimationListener() {
                    //WHENEVER OUR ANIMATION STARTED LISTEN TO IT AND DO SOMETHING
                    @Override
                    public void onAnimationStart(Animation animation) {
                        //ON ANIMATION START


                        quoteTv.setText(quotes[index]);

                        if(index<quotes.length-1){

                            index++;//+1

                        }else {

                            index=0;
                        }


                    }

                    @Override
                    public void onAnimationEnd(Animation animation) {
                        //ON ANIMATION END

                    }

                    @Override
                    public void onAnimationRepeat(Animation animation) {

                    }
                });






            }
        });







    }
}

 
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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"
    android:background="#4e48b2"
    >


    <de.hdodenhof.circleimageview.CircleImageView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/circleImg"
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:src="@drawable/stevejobs"
        app:civ_border_width="2dp"
        app:civ_border_color="#68CCE8"

        android:layout_marginTop="70dp"
        android:layout_centerHorizontal="true"/>



    <ImageView
        android:id="@+id/imgQ"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_centerHorizontal="true"

        android:layout_marginTop="30dp"
        android:src="@drawable/ic_left_quote"
        android:layout_below="@id/circleImg"
        />


    <TextView
        android:id="@+id/quoteTv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/imgQ"


        android:layout_centerHorizontal="true"
        android:layout_marginTop="25dp"
        android:fontFamily="@font/abhaya_libre_semibold"
        android:padding="15dp"

        android:text="Design is not just what it looks like and feels like. Design is how it works."
        android:textAlignment="center"

        android:textColor="#fff"
        android:textSize="28sp"

        android:textStyle="bold" />

    <de.hdodenhof.circleimageview.CircleImageView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/nextCircleImg"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:src="@drawable/ic_right"
        app:civ_border_width="2dp"
        app:civ_border_color="#68CCE8"

        android:layout_centerHorizontal="true"



        android:layout_margin="20dp"
        android:layout_above="@id/adView"


        />



    <com.google.android.gms.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
    </com.google.android.gms.ads.AdView>



</RelativeLayout>