-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from AliAzaz/issues/structuring_bugs_fixes
Gradle update, Bugs Fixes, & Functionality changes
- Loading branch information
Showing
37 changed files
with
583 additions
and
335 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
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
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 |
---|---|---|
@@ -1,40 +1,49 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-kapt' | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
id 'kotlin-android-extensions' | ||
id 'kotlin-kapt' | ||
} | ||
|
||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion '30.0.3' | ||
compileSdk compile_version | ||
buildToolsVersion = build_version | ||
|
||
defaultConfig { | ||
applicationId "com.edittextpicker.aliazaz.edittextpicker" | ||
minSdkVersion 15 | ||
targetSdkVersion 30 | ||
versionCode 1 | ||
versionName "2.1.0" | ||
minSdkVersion min_version | ||
targetSdkVersion target_version | ||
versionCode version_code | ||
versionName version_name | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
// to remove unused resources. This will reduce APK size. | ||
shrinkResources true | ||
//To obfuscate the code and to remove unused code. This will improve code security and will reduce APK size. | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
dataBinding { | ||
enabled = true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' | ||
testImplementation 'junit:junit:4.13.1' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
implementation "androidx.core:core-ktx:1.3.2" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation "androidx.appcompat:appcompat:$appcompat_version" | ||
implementation "androidx.constraintlayout:constraintlayout:$constraint_version" | ||
implementation "androidx.core:core-ktx:$corektx_version" | ||
|
||
implementation project(':edittextpicker') | ||
} | ||
repositories { | ||
mavenCentral() | ||
|
||
testImplementation "junit:junit:$junit_version" | ||
androidTestImplementation "androidx.test.ext:junit:$junit_ext_version" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" | ||
} |
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
20 changes: 20 additions & 0 deletions
20
app/src/main/java/com/edittextpicker/aliazaz/edittextpicker/BaseActivity.kt
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,20 @@ | ||
package com.edittextpicker.aliazaz.edittextpicker | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.databinding.DataBindingUtil | ||
import androidx.viewbinding.ViewBinding | ||
|
||
abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() { | ||
private lateinit var _binding: VB | ||
protected val binding get() = _binding | ||
abstract fun getLayout(): Int | ||
abstract fun init(): Unit | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
_binding = DataBindingUtil.setContentView(this, getLayout()) | ||
init() | ||
} | ||
|
||
} |
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
Oops, something went wrong.