-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a1b995d
Showing
156 changed files
with
10,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
apply plugin: 'com.github.dcendents.android-maven' | ||
group = 'com.github.amitjangid80' | ||
|
||
android { | ||
compileSdkVersion 27 | ||
defaultConfig { | ||
minSdkVersion 19 | ||
targetSdkVersion 27 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'com.android.support:appcompat-v7:27.1.1' | ||
implementation 'com.android.support:design:27.1.1' | ||
implementation 'com.android.support:cardview-v7:27.1.1' | ||
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'com.android.support:appcompat-v7:27.1.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.amit.kotlib"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" /> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.amit.kotlib.anim | ||
|
||
import android.content.Context | ||
import android.view.animation.AlphaAnimation | ||
import android.view.animation.Animation | ||
import android.view.animation.AnimationSet | ||
import android.view.animation.ScaleAnimation | ||
|
||
/** | ||
* Created by Amit Jangid on 22,May,2018 | ||
*/ | ||
object AnimLoader { | ||
fun getInAnimation(context: Context): AnimationSet { | ||
val `in` = AnimationSet(context, null) | ||
|
||
val alpha = AlphaAnimation(0.0f, 1.0f) | ||
alpha.duration = 90 | ||
|
||
val scale1 = ScaleAnimation( | ||
0.8f, 1.05f, 0.8f, 1.05f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f) | ||
|
||
scale1.duration = 135 | ||
|
||
val scale2 = ScaleAnimation( | ||
1.05f, 0.95f, 1.05f, 0.95f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f) | ||
|
||
scale2.duration = 105 | ||
scale2.startOffset = 135 | ||
|
||
val scale3 = ScaleAnimation( | ||
0.95f, 1f, 0.95f, 1.0f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f) | ||
|
||
scale3.duration = 60 | ||
scale3.startOffset = 240 | ||
|
||
`in`.addAnimation(alpha) | ||
`in`.addAnimation(scale1) | ||
`in`.addAnimation(scale2) | ||
`in`.addAnimation(scale3) | ||
|
||
return `in` | ||
} | ||
|
||
fun getOutAnimation(context: Context): AnimationSet { | ||
val out = AnimationSet(context, null) | ||
val alpha = AlphaAnimation(1.0f, 0.0f) | ||
alpha.duration = 150 | ||
|
||
val scale = ScaleAnimation( | ||
1.0f, 0.6f, 1.0f, 0.6f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, | ||
Animation.RELATIVE_TO_SELF, 0.5f) | ||
|
||
scale.duration = 150 | ||
out.addAnimation(alpha) | ||
out.addAnimation(scale) | ||
return out | ||
} | ||
} |
Oops, something went wrong.