Skip to content

Commit

Permalink
Merge pull request #7 from Jakir123/developement
Browse files Browse the repository at this point in the history
change minSDK version(15) for older version support
  • Loading branch information
Jakir123 committed Apr 4, 2020
2 parents 728be1d + af95d5e commit bf02b40
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.jakir.cse24.easyalert"
minSdkVersion 21
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
Expand All @@ -27,7 +27,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.jakir.cse24.easyalert">
package="com.jakir.cse24.easyalert_example">

<dist:module dist:instant="true" />

Expand All @@ -12,7 +12,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name="com.jakir.cse24.easyalert_example.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.jakir.cse24.easyalert
package com.jakir.cse24.easyalert_example

import android.graphics.Color
import android.graphics.Typeface
import android.icu.lang.UCharacter
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import android.view.View
import androidx.lifecycle.Observer
import com.jakir.cse24.easyalert.EasyAlert
import com.jakir.cse24.easyalert.EasyLog
import com.jakir.cse24.easyalert.EasyToast
import com.jakir.cse24.easyalert_example.R

class MainActivity : AppCompatActivity() {

Expand All @@ -34,11 +35,14 @@ class MainActivity : AppCompatActivity() {
}

fun showProgressDialog(view: View) {
EasyAlert.showProgressDialog(this, "showing progress dialog")
EasyAlert.showProgressDialog(
this,
"showing progress dialog"
)
// without message pass only activity reference
// EasyAlert.showProgressDialog(this)
Handler().postDelayed({
EasyAlert.hideProgressDialog()
EasyAlert.hideProgressDialog()
}, 5000) // 5 sec
}

Expand All @@ -59,13 +63,19 @@ class MainActivity : AppCompatActivity() {
) // also can observe this for doing something when user click on ok.
} else {
// handle cancel button click
EasyToast.showToast(this, "You clicked on cancel button!") // default toast
EasyToast.showToast(
this,
"You clicked on cancel button!"
) // default toast
}
})
}

fun showToast(view: View) {
EasyToast.showInfoToast(this,"Hello info toast...long message testing....... is it okay now ............ long long message")
EasyToast.showInfoToast(
this,
"Hello info toast...long message testing....... is it okay now ............ long long message"
)
// EasyToast.showErrorToast(this,"Hello error toast...")
// EasyToast.showSuccessToast(this,"Hello success toast...")
// EasyToast.showWarningToast(this,"Hello warning toast...")
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context="com.jakir.cse24.easyalert_example.MainActivity">

<Button
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion easyalert/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {


defaultConfig {
minSdkVersion 21
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import androidx.annotation.CheckResult
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import kotlinx.android.synthetic.main.custom_toast.view.*
Expand Down

0 comments on commit bf02b40

Please sign in to comment.