updating some more basic generic code

This commit is contained in:
tibbi 2020-05-06 21:48:03 +02:00
parent 2886b2fb76
commit 5939f99669
10 changed files with 79 additions and 17 deletions

View File

@ -12,11 +12,15 @@ android {
targetSdkVersion 29
versionCode 1
versionName "1.0"
setProperty("archivesBaseName", "dialer")
}
buildTypes {
debug {
applicationIdSuffix ".debug"
}
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
@ -24,6 +28,11 @@ android {
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_launcher_name">Dialer_debug</string>
</resources>

View File

@ -4,17 +4,38 @@
android:installLocation="auto">
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_launcher_name"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity
android:name=".activities.SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.simplemobiletools.commons.activities.AboutActivity"
android:label="@string/about"
android:parentActivityName=".activities.MainActivity" />
<activity
android:name="com.simplemobiletools.commons.activities.LicenseActivity"
android:label="@string/third_party_licences"
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
<activity
android:name="com.simplemobiletools.commons.activities.FAQActivity"
android:label="@string/frequently_asked_questions"
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
<activity android:name=".activities.MainActivity"/>
</application>
</manifest>

View File

@ -0,0 +1,11 @@
package com.simplemobiletools.dialer
import android.app.Application
import com.simplemobiletools.commons.extensions.checkUseEnglish
class App : Application() {
override fun onCreate() {
super.onCreate()
checkUseEnglish()
}
}

View File

@ -1,7 +1,8 @@
package com.simplemobiletools.dialer
package com.simplemobiletools.dialer.activities
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.simplemobiletools.dialer.R
class MainActivity : AppCompatActivity() {

View File

@ -0,0 +1,12 @@
package com.simplemobiletools.dialer.activities
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.dialer.R
open class SimpleActivity : BaseSimpleActivity() {
override fun getAppIconIDs() = arrayListOf(
R.mipmap.ic_launcher
)
override fun getAppLauncherName() = getString(R.string.app_launcher_name)
}

View File

@ -0,0 +1,11 @@
package com.simplemobiletools.dialer.activities
import android.content.Intent
import com.simplemobiletools.commons.activities.BaseSplashActivity
class SplashActivity : BaseSplashActivity() {
override fun initActivity() {
startActivity(Intent(this, MainActivity::class.java))
finish()
}
}

View File

@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
</resources>

View File

@ -1,3 +1,4 @@
<resources>
<string name="app_name">Simple-Dialer</string>
<string name="app_name">Simple Dialer</string>
<string name="app_launcher_name">Dialer</string>
</resources>

View File

@ -1,11 +1,5 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme" parent="AppTheme.Base" />
</resources>