Skip to content

Commit acc9fa5

Browse files
Added Lottie Animation on Loader
1 parent 5aea439 commit acc9fa5

29 files changed

+74
-16
lines changed

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.android.application'
33
id 'kotlin-android'
4+
id 'com.google.gms.google-services'
45
}
56

67
android {
@@ -35,11 +36,15 @@ android {
3536
dependencies {
3637

3738
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38-
implementation 'androidx.core:core-ktx:1.2.0'
39+
implementation 'androidx.core:core-ktx:1.3.2'
3940
implementation 'androidx.appcompat:appcompat:1.2.0'
4041
implementation 'com.google.android.material:material:1.2.1'
4142
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
42-
testImplementation 'junit:junit:4.+'
43+
implementation 'com.google.firebase:firebase-analytics:18.0.2'
44+
testImplementation 'junit:junit:4.13.1'
4345
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
4446
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
47+
48+
//Lottie Animations
49+
implementation "com.airbnb.android:lottie:3.4.0"
4550
}

app/google-services.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"project_info": {
3+
"project_number": "29190565119",
4+
"project_id": "kotlin-calculator-26b1f",
5+
"storage_bucket": "kotlin-calculator-26b1f.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:29190565119:android:f7e78c84dd6d5179bff0ca",
11+
"android_client_info": {
12+
"package_name": "com.aaxena.calculator"
13+
}
14+
},
15+
"oauth_client": [
16+
{
17+
"client_id": "29190565119-l8l8gu1q7n8767kut5qcdh0056765tb2.apps.googleusercontent.com",
18+
"client_type": 3
19+
}
20+
],
21+
"api_key": [
22+
{
23+
"current_key": "AIzaSyASjPjdQJyHZ2mgF55ZfaRciXNtLeCvMD8"
24+
}
25+
],
26+
"services": {
27+
"appinvite_service": {
28+
"other_platform_oauth_client": [
29+
{
30+
"client_id": "29190565119-l8l8gu1q7n8767kut5qcdh0056765tb2.apps.googleusercontent.com",
31+
"client_type": 3
32+
}
33+
]
34+
}
35+
}
36+
}
37+
],
38+
"configuration_version": "1"
39+
}

app/src/main/assets/loader.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
38.5 KB
Loading
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.aaxena.calculator
22

3-
import androidx.appcompat.app.AppCompatActivity
43
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
56

67
class MainActivity : AppCompatActivity() {
78
override fun onCreate(savedInstanceState: Bundle?) {
89
super.onCreate(savedInstanceState)
910
setContentView(R.layout.activity_main)
10-
}
11+
}
1112
}
40.2 KB
Binary file not shown.
54.2 KB
Binary file not shown.
55.2 KB
Binary file not shown.

app/src/main/res/layout/activity_main.xml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:background="@color/black"
78
tools:context=".MainActivity">
89

9-
<TextView
10-
android:layout_width="wrap_content"
11-
android:layout_height="wrap_content"
12-
android:text="Hello World!"
10+
<com.airbnb.lottie.LottieAnimationView
11+
android:id="@+id/animation_view"
12+
android:layout_width="350dp"
13+
android:layout_height="350dp"
14+
android:elevation="30dp"
1315
app:layout_constraintBottom_toBottomOf="parent"
14-
app:layout_constraintLeft_toLeftOf="parent"
15-
app:layout_constraintRight_toRightOf="parent"
16-
app:layout_constraintTop_toTopOf="parent" />
17-
16+
app:layout_constraintEnd_toEndOf="parent"
17+
app:layout_constraintHorizontal_bias="0.50"
18+
app:layout_constraintStart_toStartOf="parent"
19+
app:layout_constraintTop_toTopOf="parent"
20+
app:layout_constraintVertical_bias="0.50"
21+
app:lottie_autoPlay="true"
22+
app:lottie_fileName="loader.json"
23+
app:lottie_loop="false" />
1824
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
55
</adaptive-icon>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
55
</adaptive-icon>
-587 Bytes
Loading
Loading
-1013 Bytes
Loading
-651 Bytes
Loading
Loading
-759 Bytes
Loading
-909 Bytes
Loading
Loading
Loading
-1.38 KB
Loading
Loading
Loading
-1.6 KB
Loading
Loading
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#000000</color>
4+
</resources>

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
dependencies {
99
classpath "com.android.tools.build:gradle:4.1.2"
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11+
classpath 'com.google.gms:google-services:4.3.4'
1112

1213
// NOTE: Do not place your application dependencies here; they belong
1314
// in the individual module build.gradle files

0 commit comments

Comments
 (0)