commit cfa327d14ee72ddd1175956e65f39f0c47614ded Author: litingting Date: Wed Jul 3 16:41:47 2024 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/CustomKeyboard.jks b/app/CustomKeyboard.jks new file mode 100644 index 0000000..a3267f5 Binary files /dev/null and b/app/CustomKeyboard.jks differ diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..558982f --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,79 @@ +import java.util.Date +import java.text.SimpleDateFormat +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.jetbrains.kotlin.android) + id("applovin-quality-service") + id("com.google.gms.google-services") + id("com.google.firebase.crashlytics") +} +applovin { + apiKey = "gOk7rpCP2naSEBtPcs45qG898lZ0W4AGOK7NvppKss0DZsVbbRTUSTuv4EyztWXLOFVOFf767ZeE7z2zP5rFsD" +} +val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date()) +android { + namespace = "com.sunny.app.soft.timberkeyboardnew" + compileSdk = 34 + + defaultConfig { + //com.sunny.tools.app.soft + applicationId = "com.sunny.tools.app.soft" + minSdk = 23 + targetSdk = 34 + versionCode = 2 + versionName = "1.0.1" + setProperty("archivesBaseName", "Custom Keyboard_V" + versionName + "(${versionCode})_$timestamp") + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = true + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.activity) + implementation(libs.androidx.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + + implementation("com.geyifeng.immersionbar:immersionbar:3.2.2") + implementation("com.geyifeng.immersionbar:immersionbar-ktx:3.2.2") + + implementation ("com.google.code.gson:gson:2.10.1") + implementation ("com.github.bumptech.glide:glide:4.12.0") + annotationProcessor ("com.github.bumptech.glide:compiler:4.12.0") + + + implementation("com.applovin:applovin-sdk:12.5.0") + implementation("com.applovin.mediation:vungle-adapter:7.3.2.2") + implementation("com.applovin.mediation:bytedance-adapter:5.9.0.6.0") + implementation ("com.applovin.mediation:mintegral-adapter:16.7.51.0") + implementation("com.applovin.mediation:unityads-adapter:4.12.0.0") + + + implementation(platform("com.google.firebase:firebase-bom:32.3.1")) + implementation("com.google.firebase:firebase-analytics-ktx") + implementation("com.google.firebase:firebase-crashlytics-ktx") + + + +} \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..41473f9 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "361631722137", + "project_id": "custom-keyboardtheme-3768d", + "storage_bucket": "custom-keyboardtheme-3768d.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:361631722137:android:fb69ca1b27d2564b07a608", + "android_client_info": { + "package_name": "com.sunny.tools.app.soft" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAqGYvcuwa6SIijZVuJrvsfS221d5G2oJQ" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..3b47044 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,23 @@ +# 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 + -keep class com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity { *; } + -keep class com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity { *; } \ No newline at end of file diff --git a/app/src/androidTest/java/com/sunny/app/soft/timberkeyboardnew/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/sunny/app/soft/timberkeyboardnew/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..03955e6 --- /dev/null +++ b/app/src/androidTest/java/com/sunny/app/soft/timberkeyboardnew/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.sunny.app.soft.timberkeyboardnew + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.sunny.app.soft.timberkeyboardnew", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..60eddaa --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Abstract.json b/app/src/main/assets/Abstract.json new file mode 100644 index 0000000..3866795 --- /dev/null +++ b/app/src/main/assets/Abstract.json @@ -0,0 +1,95 @@ +{ + "ID": 24055, + "version": "3.3.4", + "name": "Abstract", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24055_89_44_1654593252.png", + "backgrounds": [{ + "ID": 24057, + "version": "3.3.4", + "skinNumber": 1101, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24057_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24057_91_44_1698326473.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24058, + "version": "3.3.4", + "skinNumber": 1102, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24058_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24058_91_44_1654593252.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24059, + "version": "3.3.4", + "skinNumber": 1103, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24059_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24059_91_44_1698326473.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24060, + "version": "3.3.4", + "skinNumber": 1104, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24060_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24060_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1104", + "videoCount": 0 + }, { + "ID": 24061, + "version": "3.3.4", + "skinNumber": 1105, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24061_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24061_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1105", + "videoCount": 0 + }, { + "ID": 24062, + "version": "3.3.6", + "skinNumber": 1106, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24062_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24062_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1106", + "videoCount": 0 + }, { + "ID": 24063, + "version": "3.3.4", + "skinNumber": 1107, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24063_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24063_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1107", + "videoCount": 0 + }, { + "ID": 24064, + "version": "3.3.4", + "skinNumber": 1108, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24064_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24064_91_44_1654593252.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1108", + "videoCount": 0 + }, { + "ID": 24065, + "version": "3.3.4", + "skinNumber": 1109, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24065_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24065_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1109", + "videoCount": 2 + }, { + "ID": 24066, + "version": "3.3.4", + "skinNumber": 1110, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24066_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24066_91_44_1698326473.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1110", + "videoCount": 2 + }, { + "ID": 24067, + "version": "3.3.4", + "skinNumber": 1111, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24067_90_44_1654593252.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24067_91_44_1698847414.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground1111", + "videoCount": 2 + }] +} diff --git a/app/src/main/assets/Chinese.json b/app/src/main/assets/Chinese.json new file mode 100644 index 0000000..5b352b8 --- /dev/null +++ b/app/src/main/assets/Chinese.json @@ -0,0 +1,71 @@ +{ + "ID": 23847, + "version": "3.0", + "name": "Chinese New Year", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23847_89_44_1642593030.png", + "backgrounds": [{ + "ID": 23848, + "version": "3.0", + "skinNumber": 9001, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23848_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23848_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23849, + "version": "3.0", + "skinNumber": 9002, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23849_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23849_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23850, + "version": "3.0", + "skinNumber": 9003, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23850_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23850_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23851, + "version": "3.0", + "skinNumber": 9004, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23851_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23851_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23852, + "version": "3.0", + "skinNumber": 9005, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23852_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23852_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23853, + "version": "3.0", + "skinNumber": 9006, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23853_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23853_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23854, + "version": "3.0", + "skinNumber": 9007, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23854_90_44_1642593030.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23854_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23856, + "version": "3.0", + "skinNumber": 9008, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23856_90_44_1642604696.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23856_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }] +} diff --git a/app/src/main/assets/Christmas.json b/app/src/main/assets/Christmas.json new file mode 100644 index 0000000..8dc3cbb --- /dev/null +++ b/app/src/main/assets/Christmas.json @@ -0,0 +1,135 @@ +{ + "ID": 21854, + "version": "3.0", + "name": "Christmas", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21854_89_44_1638354842.png", + "backgrounds": [{ + "ID": 23708, + "version": "3.3", + "skinNumber": 8001, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23708_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23708_91_44_1698849477.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23709, + "version": "3.3", + "skinNumber": 8002, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23709_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23709_91_44_1698849477.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23710, + "version": "3.3", + "skinNumber": 8003, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23710_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23710_91_44_1698849477.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23711, + "version": "3.3", + "skinNumber": 8004, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23711_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23711_91_44_1698849477.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 23712, + "version": "3.3", + "skinNumber": 8005, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23712_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23712_91_44_1698849477.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.1", + "videoCount": 0 + }, { + "ID": 23713, + "version": "3.3", + "skinNumber": 8006, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23713_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23713_91_44_1698849477.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.2", + "videoCount": 0 + }, { + "ID": 23714, + "version": "3.3", + "skinNumber": 8007, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23714_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23714_91_44_1698849477.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.3", + "videoCount": 0 + }, { + "ID": 23715, + "version": "3.3", + "skinNumber": 8008, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_23715_90_44_1638354842.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_23715_91_44_1698849477.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.4", + "videoCount": 0 + }, { + "ID": 21855, + "version": "3.0", + "skinNumber": 65, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21855_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21855_91_44_1698328754.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.5", + "videoCount": 0 + }, { + "ID": 21856, + "version": "3.0", + "skinNumber": 66, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21856_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21856_91_44_1698328754.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.7", + "videoCount": 0 + }, { + "ID": 21857, + "version": "3.0", + "skinNumber": 67, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21857_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21857_91_44_1698328754.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.8", + "videoCount": 0 + }, { + "ID": 21858, + "version": "3.0", + "skinNumber": 68, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21858_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21858_91_44_1607879233.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.9", + "videoCount": 0 + }, { + "ID": 21859, + "version": "3.0", + "skinNumber": 69, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21859_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21859_91_44_1698849995.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 21860, + "version": "3.0", + "skinNumber": 70, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21860_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21860_91_44_1607879233.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.10", + "videoCount": 0 + }, { + "ID": 21861, + "version": "3.0", + "skinNumber": 71, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21861_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21861_91_44_1607881055.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.11", + "videoCount": 0 + }, { + "ID": 21862, + "version": "3.0", + "skinNumber": 72, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21862_90_44_1607879233.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21862_91_44_1698849995.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground.21854.12", + "videoCount": 0 + }] +} diff --git a/app/src/main/assets/Glitter.json b/app/src/main/assets/Glitter.json new file mode 100644 index 0000000..093d489 --- /dev/null +++ b/app/src/main/assets/Glitter.json @@ -0,0 +1,95 @@ +{ + "ID": 20456, + "version": "3.0", + "name": "Glitter", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20456_89_44_1577098648.png", + "backgrounds": [{ + "ID": 20457, + "version": "3.0", + "skinNumber": 17, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20457_90_44_1577097049.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20457_91_44_1577097049.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20503, + "version": "3.0", + "skinNumber": 18, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20503_90_44_1577181185.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20503_91_44_1577181185.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20496, + "version": "3.0", + "skinNumber": 19, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20496_90_44_1577106813.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20496_91_44_1577106813.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20504, + "version": "3.0", + "skinNumber": 20, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20504_90_44_1577181209.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20504_91_44_1577181209.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground20", + "videoCount": 0 + }, { + "ID": 20461, + "version": "3.0", + "skinNumber": 21, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20461_90_44_1577097239.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20461_91_44_1577097239.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground21", + "videoCount": 0 + }, { + "ID": 20462, + "version": "3.0", + "skinNumber": 22, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20462_90_44_1577097347.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20462_91_44_1577097347.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground22", + "videoCount": 0 + }, { + "ID": 20505, + "version": "3.0", + "skinNumber": 23, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20505_90_44_1577181309.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20505_91_44_1577181309.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground23", + "videoCount": 0 + }, { + "ID": 20464, + "version": "3.0", + "skinNumber": 24, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20464_90_44_1577097441.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20464_91_44_1577097441.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground24", + "videoCount": 0 + }, { + "ID": 22151, + "version": "3.3", + "skinNumber": 3001, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22151_90_44_1623938500.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22151_91_44_1698327307.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground3001", + "videoCount": 3 + }, { + "ID": 22147, + "version": "3.3", + "skinNumber": 3002, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22147_90_44_1623929654.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22147_91_44_1624457460.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground3002", + "videoCount": 3 + }, { + "ID": 22148, + "version": "3.3", + "skinNumber": 3003, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22148_90_44_1623931308.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22148_91_44_1698327307.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground3003", + "videoCount": 3 + }] +} diff --git a/app/src/main/assets/Halloween.json b/app/src/main/assets/Halloween.json new file mode 100644 index 0000000..127bc89 --- /dev/null +++ b/app/src/main/assets/Halloween.json @@ -0,0 +1,71 @@ +{ + "ID": 24187, + "version": "3.3.4", + "name": "Halloween", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24187_89_44_1666095894.png", + "backgrounds": [{ + "ID": 24188, + "version": "3.3.4", + "skinNumber": 1123, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24188_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24188_91_44_1698848177.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24189, + "version": "3.3.4", + "skinNumber": 1124, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24189_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24189_91_44_1666095894.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24190, + "version": "3.3.4", + "skinNumber": 1125, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24190_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24190_91_44_1666095894.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24191, + "version": "3.3.4", + "skinNumber": 1126, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24191_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24191_91_44_1698848177.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24192, + "version": "3.3.4", + "skinNumber": 1127, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24192_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24192_91_44_1698848177.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24193, + "version": "3.3.4", + "skinNumber": 1128, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24193_90_44_1666095894.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24193_91_44_1698848177.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24194, + "version": "3.3.4", + "skinNumber": 1129, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24194_90_44_1666341686.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24194_91_44_1666780655.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 24195, + "version": "3.3.4", + "skinNumber": 1130, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_24195_90_44_1666780501.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_24195_91_44_1698848177.zip", + "inappString": "", + "videoCount": 0 + }] +} diff --git a/app/src/main/assets/Pastel.json b/app/src/main/assets/Pastel.json new file mode 100644 index 0000000..16bf310 --- /dev/null +++ b/app/src/main/assets/Pastel.json @@ -0,0 +1,95 @@ +{ + "ID": 21737, + "version": "3.2.1", + "name": "Pastel", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21737_89_44_1603799588.png", + "backgrounds": [{ + "ID": 21738, + "version": "3.2.1", + "skinNumber": 57, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21738_90_44_1625666113.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21738_91_44_1698326102.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 21739, + "version": "3.2.1", + "skinNumber": 58, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21739_90_44_1625665750.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21739_91_44_1625664575.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 21740, + "version": "3.2.1", + "skinNumber": 59, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21740_90_44_1604052582.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21740_91_44_1625664628.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 21741, + "version": "3.2.1", + "skinNumber": 60, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21741_90_44_1604052649.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21741_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground60", + "videoCount": 0 + }, { + "ID": 21742, + "version": "3.2.1", + "skinNumber": 61, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21742_90_44_1604576855.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21742_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground61", + "videoCount": 0 + }, { + "ID": 21743, + "version": "3.2.1", + "skinNumber": 62, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21743_90_44_1604052836.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21743_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground62", + "videoCount": 0 + }, { + "ID": 21744, + "version": "3.2.1", + "skinNumber": 63, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21744_90_44_1604052934.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21744_91_44_1625664848.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground63", + "videoCount": 0 + }, { + "ID": 21745, + "version": "3.2.1", + "skinNumber": 64, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_21745_90_44_1604576826.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_21745_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground64", + "videoCount": 0 + }, { + "ID": 22142, + "version": "3.3", + "skinNumber": 7001, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22142_90_44_1623758837.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22142_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground7001", + "videoCount": 3 + }, { + "ID": 22141, + "version": "3.3", + "skinNumber": 7002, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22141_90_44_1623756868.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22141_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground7002", + "videoCount": 3 + }, { + "ID": 22145, + "version": "3.3", + "skinNumber": 7003, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22145_90_44_1623764512.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22145_91_44_1698326102.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground7003", + "videoCount": 3 + }] +} diff --git a/app/src/main/assets/Unicorn.json b/app/src/main/assets/Unicorn.json new file mode 100644 index 0000000..cb9d5f2 --- /dev/null +++ b/app/src/main/assets/Unicorn.json @@ -0,0 +1,95 @@ +{ + "ID": 20447, + "version": "3.0", + "name": "Unicorn", + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20447_89_44_1577098636.png", + "backgrounds": [{ + "ID": 20448, + "version": "3.0", + "skinNumber": 9, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20448_90_44_1577096586.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20448_91_44_1577096586.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20449, + "version": "3.0", + "skinNumber": 10, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20449_90_44_1577096612.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20449_91_44_1577096612.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20497, + "version": "3.0", + "skinNumber": 11, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20497_90_44_1577107523.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20497_91_44_1577107523.zip", + "inappString": "", + "videoCount": 0 + }, { + "ID": 20451, + "version": "3.0", + "skinNumber": 12, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20451_90_44_1577096666.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20451_91_44_1577096666.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground12", + "videoCount": 0 + }, { + "ID": 20452, + "version": "3.0", + "skinNumber": 13, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20452_90_44_1577096876.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20452_91_44_1577096876.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground13", + "videoCount": 0 + }, { + "ID": 20453, + "version": "3.0", + "skinNumber": 14, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20453_90_44_1577096909.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20453_91_44_1577096909.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground14", + "videoCount": 0 + }, { + "ID": 20502, + "version": "3.0", + "skinNumber": 15, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20502_90_44_1577181135.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20502_91_44_1577181135.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground15", + "videoCount": 0 + }, { + "ID": 20455, + "version": "3.0", + "skinNumber": 16, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_20455_90_44_1577096966.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_20455_91_44_1577096966.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground16", + "videoCount": 0 + }, { + "ID": 22159, + "version": "3.3", + "skinNumber": 2001, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22159_90_44_1624619080.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22159_91_44_1624619080.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground2001", + "videoCount": 3 + }, { + "ID": 22160, + "version": "3.3", + "skinNumber": 2002, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22160_90_44_1624625621.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22160_91_44_1624625621.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground2002", + "videoCount": 3 + }, { + "ID": 22152, + "version": "3.3", + "skinNumber": 2003, + "coverPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/pictures\/photo_22152_90_44_1624358800.png", + "contentPath": "https:\/\/milenica.info\/AppSetUp\/SetUp\/files\/file_22152_91_44_1698326756.zip", + "inappString": "milicapetrovic.emojikeyboard.colorkeyboard.UnlockBackground2003", + "videoCount": 3 + }] +} diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/App.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/App.kt new file mode 100644 index 0000000..5fa84d8 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/App.kt @@ -0,0 +1,44 @@ +package com.sunny.app.soft.timberkeyboardnew + +import android.app.Application +import android.content.Context +import android.content.Intent +import androidx.localbroadcastmanager.content.LocalBroadcastManager +import com.applovin.sdk.AppLovinMediationProvider +import com.applovin.sdk.AppLovinSdk +import com.applovin.sdk.AppLovinSdkInitializationConfiguration +import com.facebook.FacebookSdk + +class App : Application() { + + companion object { + lateinit var appContext: Context + + const val SDK = + "Gh30bAynDQKKuCplTJzpa0Up7GT11xtMxoe5SGqIJaNG2a8wTWTHNvHo_CJaHm416PdQDk5mVAtfMdT9OL_8zy" + const val AD_INIT = "on_action" + var initOK = false + + } + + override fun onCreate() { + super.onCreate() + appContext = this + initMAX() + + } + + + private fun initMAX() { + val initConfig = + AppLovinSdkInitializationConfiguration.builder(SDK, this) + .setMediationProvider(AppLovinMediationProvider.MAX) + .build() + AppLovinSdk.getInstance(this).initialize(initConfig) { + initOK = true + LocalBroadcastManager.getInstance(this).sendBroadcast(Intent(AD_INIT)) + } + AppLovinSdk.getInstance(this).settings.setVerboseLogging(true) + AppLovinSdk.getInstance(this).showMediationDebugger(); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/DataManager.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/DataManager.kt new file mode 100644 index 0000000..5f4f1bc --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/DataManager.kt @@ -0,0 +1,38 @@ +package com.sunny.app.soft.timberkeyboardnew.data + +import com.google.gson.Gson +import com.google.gson.JsonArray +import com.google.gson.JsonObject +import com.sunny.app.soft.timberkeyboardnew.App +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity +import java.io.InputStream +import java.io.InputStreamReader + +class DataManager { + + private fun parseJsonFile(jsonInputStream: InputStream): CategoryEntity { + val reader = InputStreamReader(jsonInputStream) + val jsonString = reader.readText() + val gson = Gson() + val json = gson.fromJson(jsonString, JsonObject::class.java) + val entity: CategoryEntity = gson.fromJson(json.toString(), CategoryEntity::class.java) + return entity + } + + private fun getCategoryEntity(uil: String): CategoryEntity { + return parseJsonFile(App.appContext.assets.open(uil)) + } + + fun getModelList(): List { + val modelList = mutableListOf() + modelList.add(getCategoryEntity("Abstract.json")) + modelList.add(getCategoryEntity("Chinese.json")) + modelList.add(getCategoryEntity("Christmas.json")) + modelList.add(getCategoryEntity("Glitter.json")) + modelList.add(getCategoryEntity("Halloween.json")) + modelList.add(getCategoryEntity("Pastel.json")) + modelList.add(getCategoryEntity("Unicorn.json")) + return modelList + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/BackgroundEntity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/BackgroundEntity.kt new file mode 100644 index 0000000..ed90d62 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/BackgroundEntity.kt @@ -0,0 +1,13 @@ +package com.sunny.app.soft.timberkeyboardnew.data.entity + +import java.io.Serializable + +data class BackgroundEntity( + val id: Int, + val version: String, + val skinNumber: Int, + val coverPath: String, + val contentPath: String, + val inappString: String, + val videoCount: Int +) : Serializable \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/CategoryEntity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/CategoryEntity.kt new file mode 100644 index 0000000..24605f7 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/data/entity/CategoryEntity.kt @@ -0,0 +1,11 @@ +package com.sunny.app.soft.timberkeyboardnew.data.entity + +import java.io.Serializable + +data class CategoryEntity( + val id: Int, + val version: String, + val name: String, + val coverPath: String, + val backgrounds: List +) : Serializable \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxListener.java b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxListener.java new file mode 100644 index 0000000..1c1d5f5 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxListener.java @@ -0,0 +1,8 @@ +package com.sunny.app.soft.timberkeyboardnew.max; + +import com.applovin.mediation.MaxAd; + +public interface MaxListener { + void onFail(MaxAd ad); + void onHidden( ); +} diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxManager.java b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxManager.java new file mode 100644 index 0000000..9163385 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/MaxManager.java @@ -0,0 +1,91 @@ +package com.sunny.app.soft.timberkeyboardnew.max; + +import androidx.annotation.NonNull; + +import com.applovin.mediation.MaxAd; +import com.applovin.mediation.MaxAdListener; +import com.applovin.mediation.MaxError; +import com.applovin.mediation.ads.MaxInterstitialAd; +import com.sunny.app.soft.timberkeyboardnew.App; + + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class MaxManager { + private static final String one_AD = "28199ac21a0f949c"; + private static final String two_Ad = "6c78e8d532d1fe28"; + private static final String three_ad = "8f21ab262b435489"; + + private static List adList = new ArrayList<>(); + + public static MaxInterstitialAd getAd(List list) { + Collections.shuffle(list); + for (MaxInterstitialAd ad : list) { + if (ad.isReady()) { + return ad; + } + } + return null; + } + + public static List onLoadAd() { + if (adList.isEmpty()) { + MaxInterstitialAd AdT = new MaxInterstitialAd(two_Ad, App.appContext); + MaxInterstitialAd AdOne = new MaxInterstitialAd(one_AD, App.appContext); + MaxInterstitialAd AdThree = new MaxInterstitialAd(three_ad, App.appContext); + adList.add(AdOne); + adList.add(AdT); + adList.add(AdThree); + } + + for (MaxInterstitialAd ad : adList) { + if (!ad.isReady()) { + ad.loadAd(); + } + + } + + return adList; + } + + public static void setMyListener(MaxInterstitialAd ad, MaxListener maxListener) { + ad.setListener(new MaxAdListener() { + @Override + public void onAdLoaded(@NonNull MaxAd maxAd) { + + } + + @Override + public void onAdDisplayed(@NonNull MaxAd maxAd) { + } + + @Override + public void onAdHidden(@NonNull MaxAd maxAd) { + maxListener.onHidden(); + } + + @Override + public void onAdClicked(@NonNull MaxAd maxAd) { + + } + + @Override + public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) { + + } + + @Override + public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) { + maxListener.onFail(maxAd); + } + }); + + } + + + + + +} diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/WelComManager.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/WelComManager.kt new file mode 100644 index 0000000..ed22ab4 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/max/WelComManager.kt @@ -0,0 +1,86 @@ +package com.sunny.app.soft.timberkeyboardnew.max + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.CountDownTimer +import android.util.Log +import androidx.localbroadcastmanager.content.LocalBroadcastManager +import com.applovin.mediation.MaxAd +import com.applovin.mediation.ads.MaxInterstitialAd +import com.sunny.app.soft.timberkeyboardnew.App + +object WelComManager { + + private lateinit var timer: CountDownTimer + + private var need_Show = true + + private lateinit var lists: List + + fun initTimer(context: Context,countTime:Long,goMainAction: () -> Unit):CountDownTimer{ + need_Show = true + timer = object : CountDownTimer(countTime, 100) { + override fun onTick(millisUntilFinished: Long) { + if (need_Show) { + startShowAd { + Log.d("----------","--onTick----------it=$it") + if(it){ + goMainAction.invoke() + } + } + } + } + + override fun onFinish() { + if (need_Show) { + startShowAd { + Log.d("----------","--onFinish----------it=$it") + goMainAction.invoke() + } + } + } + } + startAd(context) + return timer + } + private fun startAd(context: Context) { + if (!App.initOK) { + LocalBroadcastManager.getInstance(context).registerReceiver(object : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + lists = MaxManager.onLoadAd() + timer.start() + + Log.d("------------", "------------1sucess") + } + }, IntentFilter(App.AD_INIT)) + } else { + lists = MaxManager.onLoadAd() + timer.start() + Log.d("------------", "------------2sucess") + } + } + + private fun startShowAd(action: (go:Boolean) -> Unit) { + val checkCacheAd = MaxManager.getAd(lists) + if (checkCacheAd == null) { + action.invoke(false) + } else { + need_Show = false + MaxManager.setMyListener(checkCacheAd, object : MaxListener { + override fun onFail(ad: MaxAd?) { + action.invoke(true) + } + + + override fun onHidden() { + action.invoke(true) + } + + }) + checkCacheAd.showAd() + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/service/KeyboardService.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/service/KeyboardService.kt new file mode 100644 index 0000000..cbf7f4e --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/service/KeyboardService.kt @@ -0,0 +1,189 @@ +package com.sunny.app.soft.timberkeyboardnew.service + +import android.inputmethodservice.InputMethodService +import android.inputmethodservice.Keyboard +import android.inputmethodservice.KeyboardView +import android.os.Build +import android.os.SystemClock +import android.view.View +import android.view.inputmethod.EditorInfo +import androidx.annotation.RequiresApi +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.databinding.ViewInputBinding +import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant + +class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListener { + + private lateinit var binding: ViewInputBinding + private val views = + intArrayOf(R.xml.keyboard_letter, R.xml.keyboard_number, R.xml.keyboard_symbol) + private var mouble = false + private var laTime = -3L + + private fun keyCase(toBig: Boolean, keyboard: Keyboard) { + for (key in keyboard.keys) { + if (!key.label.isNullOrEmpty()) { + if (key.label.length == 1) { + var strin: Char = if (toBig) { + key.label.toString()[0].uppercaseChar() + } else { + key.label.toString()[0].lowercaseChar() + } + key.run { + label = strin.toString() + codes[0] = strin.code + } + } + } + } + } + + private fun changeXml(mode: Int) { + binding.myCustomInput.run { + when (mode) { + 0 -> { + xmlMode = AppConstant.xml0 + keyboard = Keyboard(context, views[0]) + } + + 2 -> { + xmlMode = AppConstant.xml2 + keyboard = Keyboard(context, views[2]) + + } + + 1 -> { + xmlMode = AppConstant.xml1 + keyboard = Keyboard(context, views[1]) + } + } + } + } + + + override fun onCreateInputView(): View { + binding = ViewInputBinding.inflate(layoutInflater, null, false) + binding.myCustomInput.setOnKeyboardActionListener(this) + binding.myCustomInput.run { + keyboard = Keyboard(this@KeyboardService, views[0]) + isEnabled = true + } + return binding.root + } + + + override fun onWindowShown() { + super.onWindowShown() + binding.myCustomInput.upUi(this@KeyboardService) + } + + override fun onPress(primaryCode: Int) { + mouble = false + if (primaryCode == Keyboard.KEYCODE_SHIFT) { + if (300 > SystemClock.elapsedRealtime() - laTime) { + mouble = true + } + laTime = SystemClock.elapsedRealtime() + } + } + + override fun onRelease(primaryCode: Int) { + } + + override fun onKey(primaryCode: Int, keyCodes: IntArray?) { + + when (primaryCode) { + Keyboard.KEYCODE_SHIFT -> { + binding.myCustomInput.run { + val myKeyboard = keyboard + when (shiftStatus) { + AppConstant.Shift_S -> { + shiftStatus = if (mouble) { + AppConstant.Shift_B_lo + } else { + AppConstant.Shift_B + } + keyCase(true, myKeyboard) + keyboard = myKeyboard + } + + AppConstant.Shift_B_lo -> { + shiftStatus = AppConstant.Shift_S + keyCase(false, myKeyboard) + keyboard = myKeyboard + } + + AppConstant.Shift_B -> { + shiftStatus = if (mouble) { + AppConstant.Shift_B_lo + } else { + keyCase(false, myKeyboard) + AppConstant.Shift_S + } + keyboard = myKeyboard + } + } + } + } + + // 点击完成 + Keyboard.KEYCODE_DONE -> { + currentInputConnection.performEditorAction(EditorInfo.IME_ACTION_SEARCH) + } + + Keyboard.KEYCODE_MODE_CHANGE -> { + binding.myCustomInput.run { + if (xmlMode == AppConstant.xml0) { + changeXml(1) + } else { + changeXml(0) + } + } + } + + AppConstant.SHIFT_NUMBER -> { + changeXml(2) + } + + Keyboard.KEYCODE_DELETE -> { + currentInputConnection.deleteSurroundingText(1, 0) + } + + AppConstant.SHIFT_SYMBOL -> { + changeXml(1) + } + + else -> { + currentInputConnection.commitText(primaryCode.toChar().toString(), 1) + binding.myCustomInput.keyboard = binding.myCustomInput.apply { + if (shiftStatus == AppConstant.Shift_B) { + shiftStatus = AppConstant.Shift_S + keyCase(false, binding.myCustomInput.keyboard) + } + }.keyboard + } + + } + + } + + override fun onText(text: CharSequence?) { + + } + + override fun swipeLeft() { + + } + + override fun swipeRight() { + + } + + override fun swipeDown() { + + } + + override fun swipeUp() { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/AppConstant.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/AppConstant.kt new file mode 100644 index 0000000..291bc74 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/AppConstant.kt @@ -0,0 +1,51 @@ +package com.sunny.app.soft.timberkeyboardnew.tools + +import com.sunny.app.soft.timberkeyboardnew.App +import com.sunny.app.soft.timberkeyboardnew.R + +object AppConstant { + val KEY_EXTRA = "key_extra" + val res_path = "/res" + const val SHARE_NAME = "sp_name" + const val SHIFT_NUMBER = -300 + const val SHIFT_SYMBOL = -301 + const val KEY_CUR_Path = "all_path" + const val KEY_CUR_Path_img = "all_path_img" + const val xml0 = 24 + const val xml1 = 25 + const val xml2 = 26 + const val Shift_B_lo = 2 + const val Shift_S = 0 + const val Shift_B = 1 + + val title_fun_Bg = "btn_keyboard_key_functional_normal.9.png" + val title_del_ic = "sym_keyboard_delete_normal.png" + val title_shitf_ic = "sym_keyboard_shift.png" + val title_func_bg_press = "btn_keyboard_key_functional_pressed.9.png" + val title_nor_Bg = "btn_keyboard_key_normal_normal.9.png" + val parent_path = "/drawable-xhdpi-v4/" + val xx_path = "/drawable-xxhdpi-v4/" + val color_path = "/colors.xml" + val title_shitf_ic_lock = "sym_keyboard_shift_locked.png" + val title_bg = "keyboard_background.jpg" + val title_nor_Bg_press = "btn_keyboard_key_normal_pressed.9.png" + val title_sp_Bg = "btn_keyboard_spacekey_normal_normal.9.png" + val title_sp_Bg_press = "btn_keyboard_spacekey_normal_pressed.9.png" + + + val title_color = "key_text_color_normal" + + + const val KEY_POS: String = "key_pos" + const val KEYTheme = "key_theme" + + + fun getDeleteRes(id: String) = String.format(App.appContext.getString(R.string.delete_res), id) + + fun getFunBg(id: String) = String.format(App.appContext.getString(R.string.but_res), id) + + fun getCapsenable(id: String) = String.format(App.appContext.getString(R.string.caps_res), id) + fun getCaps(id: String) = String.format(App.appContext.getString(R.string.caps_no_res), id) + + fun getnormalBg(id: String) = String.format(App.appContext.getString(R.string.normal_res), id) +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/KeyboardManager.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/KeyboardManager.kt new file mode 100644 index 0000000..0a654f9 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/KeyboardManager.kt @@ -0,0 +1,26 @@ +package com.sunny.app.soft.timberkeyboardnew.tools + +import android.content.Context +import android.provider.Settings +import android.view.inputmethod.InputMethodManager +import com.sunny.app.soft.timberkeyboardnew.App + +object KeyboardManager { + + private val inputManager = App.appContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager + + fun isChoose(): Boolean { + return Settings.Secure.getString(App.appContext.contentResolver, Settings.Secure.DEFAULT_INPUT_METHOD) + .startsWith(App.appContext.packageName) + } + + fun isEnable(): Boolean { + for (inputMethodInfo in inputManager.enabledInputMethodList) { + if (inputMethodInfo.id.startsWith(App.appContext.packageName)) { + return true + } + } + return false + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/ZipTools.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/ZipTools.kt new file mode 100644 index 0000000..d686c59 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/tools/ZipTools.kt @@ -0,0 +1,41 @@ +package com.sunny.app.soft.timberkeyboardnew.tools + +import java.io.BufferedOutputStream +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.io.IOException +import java.util.zip.ZipInputStream + +object ZipTools { + fun unzip(zipFilePath: String?, destDirectory: String) { + val destDir = File(destDirectory) + if (!destDir.exists()) { + destDir.mkdir() + } + val zipIn = ZipInputStream(FileInputStream(zipFilePath)) + var entry = zipIn.nextEntry + while (entry != null) { + val filePath = destDirectory + File.separator + entry.name + if (!entry.isDirectory) { + extractFile(zipIn, filePath) + } else { + val dir = File(filePath) + dir.mkdir() + } + zipIn.closeEntry() + entry = zipIn.nextEntry + } + zipIn.close() + } + + private fun extractFile(zipIn: ZipInputStream, filePath: String) { + val bos = BufferedOutputStream(FileOutputStream(filePath)) + val bytesIn = ByteArray(4096) + var read: Int + while ((zipIn.read(bytesIn).also { read = it }) != -1) { + bos.write(bytesIn, 0, read) + } + bos.close() + } +} diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/BaseActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/BaseActivity.kt new file mode 100644 index 0000000..4a7b2c2 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/BaseActivity.kt @@ -0,0 +1,26 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.os.Bundle +import android.view.View +import androidx.appcompat.app.AppCompatActivity +import com.gyf.immersionbar.ImmersionBar + +abstract class BaseActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(setRootView()) + initView() + } + + abstract fun setRootView(): View + + open fun initView() { + initStatusBar() + } + + private fun initStatusBar() { + ImmersionBar.with(this).statusBarDarkFont(true).init() + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/DownloadActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/DownloadActivity.kt new file mode 100644 index 0000000..30d667f --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/DownloadActivity.kt @@ -0,0 +1,338 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.content.Context +import android.content.Intent +import android.content.SharedPreferences +import android.graphics.BitmapFactory +import android.graphics.drawable.BitmapDrawable +import android.util.Log +import android.view.View +import android.widget.Toast +import com.applovin.mediation.MaxAd +import com.applovin.mediation.ads.MaxInterstitialAd +import com.bumptech.glide.Glide +import com.bumptech.glide.load.DataSource +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.load.engine.GlideException +import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions +import com.bumptech.glide.request.RequestListener +import com.bumptech.glide.request.RequestOptions +import com.bumptech.glide.request.target.Target +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity +import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityDownloadBinding +import com.sunny.app.soft.timberkeyboardnew.max.MaxListener +import com.sunny.app.soft.timberkeyboardnew.max.MaxManager +import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant +import com.sunny.app.soft.timberkeyboardnew.tools.KeyboardManager +import com.sunny.app.soft.timberkeyboardnew.tools.ZipTools +import com.sunny.app.soft.timberkeyboardnew.ui.listener.ApplyListener +import java.io.ByteArrayOutputStream +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.io.InputStream + +class DownloadActivity : + BaseActivity(), + View.OnClickListener, + ApplyListener { + + private lateinit var binding: ActivityDownloadBinding + + private lateinit var backgroundEntity: BackgroundEntity + + private lateinit var zipPath: String + + private lateinit var unzipPath: String + + private lateinit var sp: SharedPreferences + private lateinit var ads:List + override fun setRootView(): View { + binding = ActivityDownloadBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + backgroundEntity = intent.getSerializableExtra(AppConstant.KEY_EXTRA) as BackgroundEntity + + ads = MaxManager.onLoadAd() + + sp = getSharedPreferences( + AppConstant.SHARE_NAME, Context.MODE_PRIVATE + ) + + val path = sp.getString("${AppConstant.KEY_CUR_Path_img}_${backgroundEntity.skinNumber}", "") + val file = File(path) + if (file.exists()) { + val bitmapDrawable = + BitmapDrawable(resources, BitmapFactory.decodeFile(path)) + binding.downloadImg.setImageDrawable(bitmapDrawable) + + Log.d("----------", "exists") + } else { + initImg() + } + + //187df1496820a65c01b38bc74333cc1bae249226b337397125f7c6367023e86c.0 + unzipPath = "$cacheDir/${backgroundEntity.skinNumber}/skin_${backgroundEntity.skinNumber}" + + + initDownload() + initButton() + initTitle() + } + + private fun initTitle() { + binding.bgName.text = "Keyboard background" + } + + private fun initDownload() { + val cacheDir = cacheDir + val dataUrl = backgroundEntity.contentPath + zipPath = "$cacheDir/$dataUrl" + } + + private fun onShowAd() { + val checkCacheAd = MaxManager.getAd(ads) + if (checkCacheAd == null) { + } else { + MaxManager.setMyListener(checkCacheAd, object : MaxListener { + override fun onFail(ad: MaxAd) { + startSetSkin() + } + override fun onHidden() { + startSetSkin() + } + }) + checkCacheAd.showAd() + } + } + private fun initButton() { + binding.downloadBack.setOnClickListener(this) + binding.btnDownload.setOnClickListener(this) + } + + private fun initImg() { + try { + Glide + .with(this) + .downloadOnly() + .load(backgroundEntity.coverPath) +// .apply( +// RequestOptions().placeholder(R.drawable.png_loading) +// ) +// .diskCacheStrategy(DiskCacheStrategy.ALL) + .addListener(object : RequestListener { + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target?, + isFirstResource: Boolean + ): Boolean { + Log.d( + "----------", + "onLoadFailed backgroundEntity.coverPath=${backgroundEntity.coverPath} e=${e?.message} " + ) + return false + } + + override fun onResourceReady( + resource: File?, + model: Any?, + target: Target?, + dataSource: DataSource?, + isFirstResource: Boolean + ): Boolean { + resource?.let { + Log.d("----------", "it.absolutePath=${it.absolutePath}") + + val edit = sp.edit() + // 存放键值对 + edit.run { + putString( + "${AppConstant.KEY_CUR_Path_img}_${backgroundEntity.skinNumber}", + it.absolutePath + ) + apply() + } + + val bitmapDrawable = + BitmapDrawable(resources, BitmapFactory.decodeFile(it.absolutePath)) + binding.downloadImg.setImageDrawable(bitmapDrawable) + } + + return false + } + + }).preload() + + } catch (e: Exception) { + e.printStackTrace() + } + } + + override fun onClick(v: View?) { + when (v) { + binding.downloadBack -> finish() + binding.btnDownload -> { + applySkin() + } + } + } + + private fun applySkin() { + + + if (!KeyboardManager.isChoose() || !KeyboardManager.isEnable()) { + Toast.makeText(this, getString(R.string.unEnable), Toast.LENGTH_SHORT).show() + val intent = Intent(this, SetKeyboardActivity::class.java) + startActivity(intent) + return + } + + onShowAd() + + + } + + private fun startSetSkin(){ + binding.downloadProgress.visibility = View.VISIBLE + + val zipFile = File(unzipPath) + + if (zipFile.exists()) { +// val allThemePath: String = getAllThemePath(backgroundEntity.skinNumber.toString()) + val edit = sp.edit() + edit.run { + putString(AppConstant.KEY_CUR_Path, backgroundEntity.skinNumber.toString()) + apply() + } + + binding.downloadProgress.visibility = View.GONE + Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show() + finish() + + } else { + getZipData( + backgroundEntity.skinNumber, + backgroundEntity.contentPath, + this@DownloadActivity, + this + ) + } + } + + private fun getAllThemePath(zip: String): String { + val result = sp.getString(zip, "") + return result!! + } + + private fun getZipData( + skinNumber: Int, + contentPath: String, + context: Context, + listener: ApplyListener + ) { + Glide.with(context).asFile().load(contentPath).addListener(object : RequestListener { + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target?, + isFirstResource: Boolean + ): Boolean { + listener.applyListener(false, "") + return false + } + + override fun onResourceReady( + resource: File?, + model: Any?, + target: Target?, + dataSource: DataSource?, + isFirstResource: Boolean + ): Boolean { + val fileInputStream = FileInputStream(resource) + saveFile(skinNumber, contentPath, fileInputStream, listener) + return false + } + + }).preload() + } + + private fun saveFile( + skinNumber: Int, + contentPath: String, + fileInputStream: FileInputStream, + listener: ApplyListener + ) { + val zipPath = "${cacheDir}/${skinNumber}_zip" + val unZipPath = "${cacheDir}/${skinNumber}" + val b = writeNewFile(fileInputStream, zipPath) + if (b) { + ZipTools.unzip(zipPath, unZipPath) + if (unZipPath.isNotEmpty()) { + listener.applyListener(true, unZipPath) + } else { + listener.applyListener(false, "") + } + } + + } + + private fun writeNewFile(input: InputStream, filePath: String): Boolean { + var stream: FileOutputStream? = null + var outStream: ByteArrayOutputStream? = null + try { + val outStream = ByteArrayOutputStream() + val bytes = ByteArray(4096) + var length = 0 + while (input.read(bytes).also { + length = it + } != -1) { + outStream.write(bytes, 0, length) + } + val file = File(filePath) + if (!file.exists()) { + file.createNewFile() + } + stream = FileOutputStream(file) + stream.run { + write(outStream.toByteArray()) + } + outStream.close() + stream.close() + return true + } catch (ex: Exception) { + outStream?.close() + stream?.close() + return false + } + } + + override fun applyListener(isSuccess: Boolean, str: String) { + binding.downloadProgress.visibility = View.GONE + if (isSuccess) { + val lastIndexOf: Int = str.lastIndexOf(AppConstant.res_path) + val substring = str.subSequence(0, lastIndexOf + AppConstant.res_path.length).toString() + val edit = sp.edit() + edit.run { + putString(AppConstant.KEY_CUR_Path, backgroundEntity.skinNumber.toString()) + apply() + } + edit.run { + putString( + backgroundEntity.skinNumber.toString(), + backgroundEntity.skinNumber.toString() + ) + apply() + } + Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show() + finish() + } else { + Toast.makeText(this, getString(R.string.fail_apply), Toast.LENGTH_LONG).show() + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/LoadingActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/LoadingActivity.kt new file mode 100644 index 0000000..3c8098e --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/LoadingActivity.kt @@ -0,0 +1,56 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.CountDownTimer +import android.util.Log +import android.view.View +import androidx.localbroadcastmanager.content.LocalBroadcastManager +import com.applovin.mediation.MaxAd +import com.applovin.mediation.ads.MaxInterstitialAd +import com.sunny.app.soft.timberkeyboardnew.App +import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityLoadingBinding +import com.sunny.app.soft.timberkeyboardnew.max.MaxListener +import com.sunny.app.soft.timberkeyboardnew.max.MaxManager +import com.sunny.app.soft.timberkeyboardnew.max.WelComManager +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch + +class LoadingActivity : BaseActivity() { + + private lateinit var binding: ActivityLoadingBinding + private val coroutineScope = CoroutineScope(Dispatchers.Main) + private val countTime: Long = 12000 + private lateinit var lists: List + private lateinit var timer: CountDownTimer + + + override fun setRootView(): View { + binding = ActivityLoadingBinding.inflate(layoutInflater) + return binding.root + } + + override fun onDestroy() { + super.onDestroy() + timer.cancel() + } + override fun initView() { + super.initView() + timer = WelComManager.initTimer(this,countTime) { + intoMainActivity() + } + + } + + + private fun intoMainActivity() { + val intent = Intent(this, MainActivity::class.java) + startActivity(intent) + finish() + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/MainActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/MainActivity.kt new file mode 100644 index 0000000..ffaa0da --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/MainActivity.kt @@ -0,0 +1,91 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.view.View +import android.view.ViewParent +import androidx.fragment.app.Fragment +import androidx.viewpager.widget.ViewPager +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityMainBinding +import com.sunny.app.soft.timberkeyboardnew.ui.adapter.MainViewPagerAdapter +import com.sunny.app.soft.timberkeyboardnew.ui.fragment.HomeFragment +import com.sunny.app.soft.timberkeyboardnew.ui.fragment.SettingFragment + +class MainActivity : + BaseActivity(), + View.OnClickListener, + ViewPager.OnPageChangeListener { + + private lateinit var binding: ActivityMainBinding + private lateinit var fragmentList: MutableList + + override fun setRootView(): View { + binding = ActivityMainBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + initViewPager() + initTabButton() + } + + private fun initTabButton() { + binding.mainTabHome.setOnClickListener(this) + binding.mainTabSet.setOnClickListener(this) + } + + private fun initViewPager() { + fragmentList = mutableListOf() + fragmentList.add(HomeFragment()) + fragmentList.add(SettingFragment()) + binding.mainViewpager.apply { + adapter = MainViewPagerAdapter(fragmentList, supportFragmentManager) + addOnPageChangeListener(this@MainActivity) + offscreenPageLimit = 0 + setTabSelect(0) + } + } + + private fun setTabSelect(i: Int) { + when (i) { + 0 -> { + binding.mainTabHome.isSelected = true + binding.mainTabSet.isSelected = false + binding.mainTvHome.setTextColor(getColor(R.color.orange)) + binding.mainTvSetting.setTextColor(getColor(R.color.black)) + binding.mainViewpager.currentItem = 0 + } + + 1 -> { + binding.mainTabHome.isSelected = false + binding.mainTabSet.isSelected = true + binding.mainTvHome.setTextColor(getColor(R.color.black)) + binding.mainTvSetting.setTextColor(getColor(R.color.orange)) + binding.mainViewpager.currentItem = 1 + } + } + } + + override fun onClick(v: View?) { + when (v) { + binding.mainTabHome -> { + setTabSelect(0) + } + + binding.mainTabSet -> { + setTabSelect(1) + } + } + } + + override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { + } + + override fun onPageSelected(position: Int) { + setTabSelect(position) + } + + override fun onPageScrollStateChanged(state: Int) { + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SelectActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SelectActivity.kt new file mode 100644 index 0000000..ae91127 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SelectActivity.kt @@ -0,0 +1,61 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.content.Intent +import android.util.Log +import android.view.View +import androidx.recyclerview.widget.GridLayoutManager +import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity +import com.sunny.app.soft.timberkeyboardnew.databinding.ActivitySelectBinding +import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant +import com.sunny.app.soft.timberkeyboardnew.ui.adapter.SelectAdapter +import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnBgItemClickListener + +class SelectActivity : BaseActivity(), View.OnClickListener { + + private lateinit var binding: ActivitySelectBinding + private lateinit var categoryEntity: CategoryEntity + override fun setRootView(): View { + binding = ActivitySelectBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + categoryEntity = intent.getSerializableExtra(AppConstant.KEY_EXTRA) as CategoryEntity + initButton() + initTitle() + initRecyclerView() + } + + private fun initRecyclerView() { + binding.selectRecyclerView.apply { + layoutManager = GridLayoutManager(this@SelectActivity, 2) + adapter = SelectAdapter(context, categoryEntity.backgrounds, object : OnBgItemClickListener { + override fun onItemClick(position: Int, backgroundEntity: BackgroundEntity) { + val intent = Intent(this@SelectActivity, DownloadActivity::class.java) + intent.putExtra(AppConstant.KEY_EXTRA, backgroundEntity) + startActivity(intent) + Log.e("TAG", "onItemClick: $backgroundEntity") + } + }) + } + } + + private fun initTitle() { + binding.selectTitle.text = categoryEntity.name + } + + private fun initButton() { + binding.selectBack.setOnClickListener(this) + } + + override fun onClick(v: View?) { + when (v) { + binding.selectBack -> { + finish() + } + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SetKeyboardActivity.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SetKeyboardActivity.kt new file mode 100644 index 0000000..6b8ec28 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/activity/SetKeyboardActivity.kt @@ -0,0 +1,106 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.activity + +import android.app.AlertDialog +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.provider.Settings +import android.view.View +import android.view.inputmethod.InputMethodManager +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityEnableBinding +import com.sunny.app.soft.timberkeyboardnew.tools.KeyboardManager + +class SetKeyboardActivity : + BaseActivity(), + View.OnClickListener { + + private lateinit var binding: ActivityEnableBinding + private lateinit var inputManager: InputMethodManager + private lateinit var broadcastReceiver: BroadcastReceiver + + override fun setRootView(): View { + binding = ActivityEnableBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + inputManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager + broadcastReceiver = StepperReceiver() + updateUi() + register() + initButton() + } + + private fun initButton() { + binding.setKeyboardBack.setOnClickListener(this) + binding.setKeyboardSteps1.setOnClickListener(this) + binding.setKeyboardSteps2.setOnClickListener(this) + } + + private fun register() { + registerReceiver(broadcastReceiver, IntentFilter(Intent.ACTION_INPUT_METHOD_CHANGED)) + } + + inner class StepperReceiver : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + updateUi() + } + + } + + private fun updateUi() { + if (KeyboardManager.isEnable()) { + binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_grey) + } else { + binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_orange) + } + if (KeyboardManager.isChoose()) { + binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_grey) + } else { + binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_orange) + } + if (KeyboardManager.isChoose() && KeyboardManager.isEnable()) { + showInfoDialog() + } + + } + + private fun showInfoDialog() { + AlertDialog.Builder(this).apply { + title = "Settings" + setMessage("You have successfully activated the soft keyboard!") + setPositiveButton("OK") { _, _ -> finish() } + }.create().show() + } + + override fun onResume() { + super.onResume() + updateUi() + } + + override fun onDestroy() { + super.onDestroy() + unregisterReceiver(broadcastReceiver) + } + + override fun onClick(v: View?) { + when (v) { + binding.setKeyboardBack -> finish() + binding.setKeyboardSteps1 -> chooseKeyboard() + binding.setKeyboardSteps2 -> settingKeyboard() + } + } + + private fun settingKeyboard() { + inputManager.showInputMethodPicker() + } + + private fun chooseKeyboard() { + val intent = Intent(Settings.ACTION_INPUT_METHOD_SETTINGS) + startActivity(intent) + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/HomeViewAdapter.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/HomeViewAdapter.kt new file mode 100644 index 0000000..34a0536 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/HomeViewAdapter.kt @@ -0,0 +1,111 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.adapter + +import android.content.Context +import android.graphics.drawable.Drawable +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.ProgressBar +import android.widget.TextView +import androidx.cardview.widget.CardView +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import com.bumptech.glide.RequestBuilder +import com.bumptech.glide.load.DataSource +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.load.engine.GlideException +import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions +import com.bumptech.glide.request.RequestListener +import com.bumptech.glide.request.RequestOptions +import com.bumptech.glide.request.target.Target +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity +import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnItemClickListener + +class HomeViewAdapter( + private val context: Context, + private val modelList: List, + private val listener: OnItemClickListener +) : RecyclerView.Adapter() { + + inner class ItemViewHolder(view: View) : RecyclerView.ViewHolder(view) { + + + val titleView: TextView = itemView.findViewById(R.id.item_title) + + val imgItemView: ImageView = itemView.findViewById(R.id.item_img) + + val rootItemLayout: CardView = itemView.findViewById(R.id.item_root) + + val pd: ProgressBar = itemView.findViewById(R.id.pb) + + + fun loadImg(context: Context, url: String, img: ImageView) { + + try { + Glide + .with(context) + .load(url) + .thumbnail(0.5f) + .diskCacheStrategy(DiskCacheStrategy.ALL) + .listener(object : RequestListener { + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target?, + isFirstResource: Boolean + ): Boolean { + + pd.visibility = View.INVISIBLE + return false + } + + override fun onResourceReady( + resource: Drawable?, + model: Any?, + target: Target?, + dataSource: DataSource?, + isFirstResource: Boolean + ): Boolean { + + pd.visibility = View.INVISIBLE + + return false + } + }) +// .apply( +// RequestOptions().placeholder(R.drawable.png_loading) +// ) + .transition(DrawableTransitionOptions.withCrossFade()) + .into(img) + } catch (e: Exception) { + e.printStackTrace() + } + } + + + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder { + val view = LayoutInflater.from(context).inflate(R.layout.item_classification, parent, false) + return ItemViewHolder(view) + } + + + override fun getItemCount(): Int { + return modelList.size + } + + override fun onBindViewHolder(holder: ItemViewHolder, position: Int) { + val category = modelList[position] + + holder.loadImg(context, category.coverPath, holder.imgItemView) + + holder.rootItemLayout.setOnClickListener { + listener.onItemClick(position, category) + } + holder.titleView.text = category.name + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/MainViewPagerAdapter.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/MainViewPagerAdapter.kt new file mode 100644 index 0000000..6682f84 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/MainViewPagerAdapter.kt @@ -0,0 +1,20 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.adapter + +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter + +class MainViewPagerAdapter( + private val fragmentList: List, + fragmentManager: FragmentManager +) : + FragmentPagerAdapter(fragmentManager) { + override fun getCount(): Int { + return fragmentList.size + } + + override fun getItem(position: Int): Fragment { + return fragmentList[position] + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/SelectAdapter.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/SelectAdapter.kt new file mode 100644 index 0000000..40ea396 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/adapter/SelectAdapter.kt @@ -0,0 +1,98 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.adapter + +import android.content.Context +import android.graphics.drawable.Drawable +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.ProgressBar +import androidx.cardview.widget.CardView +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import com.bumptech.glide.load.DataSource +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.load.engine.GlideException +import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions +import com.bumptech.glide.request.RequestListener +import com.bumptech.glide.request.RequestOptions +import com.bumptech.glide.request.target.Target +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity +import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnBgItemClickListener + +class SelectAdapter( + private val context: Context, + private val backgroundEntityList: List, + private val listener: OnBgItemClickListener +) : RecyclerView.Adapter() { + + inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + + val imgItemView: ImageView = itemView.findViewById(R.id.item_img) + val rootItemLayout: CardView = itemView.findViewById(R.id.item_root) + + val pd: ProgressBar = itemView.findViewById(R.id.select_pd) + fun loadImg(context: Context, url: String, imgView: ImageView) { + pd.visibility = View.VISIBLE + try { + Glide + .with(context) + .load(url) + .thumbnail(0.1f) + .diskCacheStrategy(DiskCacheStrategy.ALL) + .listener(object : RequestListener { + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target?, + isFirstResource: Boolean + ): Boolean { + + pd.visibility = View.GONE + return false + } + + override fun onResourceReady( + resource: Drawable?, + model: Any?, + target: Target?, + dataSource: DataSource?, + isFirstResource: Boolean + ): Boolean { + + pd.visibility = View.GONE + + return false + } + }) +// .apply( +// RequestOptions().placeholder(R.drawable.png_loading) +// ) + .transition(DrawableTransitionOptions.withCrossFade()) + .into(imgView) + } catch (e: Exception) { + e.printStackTrace() + } + } + + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { + val view = LayoutInflater.from(context).inflate(R.layout.item_background, parent, false) + return ViewHolder(view) + + } + + override fun getItemCount(): Int { + return backgroundEntityList.size + } + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val backgroundEntity = backgroundEntityList[position] + holder.rootItemLayout.setOnClickListener { + listener.onItemClick(position, backgroundEntity) + } + holder.loadImg(context, backgroundEntity.coverPath, holder.imgItemView) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/BaseFragment.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/BaseFragment.kt new file mode 100644 index 0000000..88dccfc --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/BaseFragment.kt @@ -0,0 +1,24 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.fragment + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment + +abstract class BaseFragment : Fragment() { + + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + return setRootView() + } + + abstract fun setRootView(): View + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + initView() + } + + open fun initView() { + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/HomeFragment.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/HomeFragment.kt new file mode 100644 index 0000000..cbf880e --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/HomeFragment.kt @@ -0,0 +1,85 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.fragment + +import android.content.Intent +import android.util.Log +import android.view.View +import androidx.recyclerview.widget.LinearLayoutManager +import com.applovin.mediation.MaxAd +import com.applovin.mediation.ads.MaxInterstitialAd +import com.sunny.app.soft.timberkeyboardnew.App +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.data.DataManager +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity +import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentHomeBinding +import com.sunny.app.soft.timberkeyboardnew.max.MaxListener +import com.sunny.app.soft.timberkeyboardnew.max.MaxManager +import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant +import com.sunny.app.soft.timberkeyboardnew.ui.activity.SelectActivity +import com.sunny.app.soft.timberkeyboardnew.ui.adapter.HomeViewAdapter +import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnItemClickListener + +class HomeFragment : + BaseFragment() { + + private lateinit var binding: FragmentHomeBinding + private lateinit var ads:List + private lateinit var data:CategoryEntity + override fun setRootView(): View { + binding = FragmentHomeBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + ads = MaxManager.onLoadAd() + initTitle() + initViewPager() + } + + private fun initViewPager() { + + val categoryEntityList = DataManager().getModelList() + + binding.homeRecyclerView.apply { + layoutManager = LinearLayoutManager(requireContext()).apply { + orientation = LinearLayoutManager.VERTICAL + } + adapter = HomeViewAdapter(requireContext(), categoryEntityList, object : OnItemClickListener { + override fun onItemClick(position: Int, categoryEntity: CategoryEntity) { + data = categoryEntity + onShowAd() + + + } + }) + } + + } + + private fun enterList(){ + val intent = Intent(requireContext(), SelectActivity::class.java) + intent.putExtra(AppConstant.KEY_EXTRA, data) + startActivity(intent) + } + + + fun onShowAd() { + val checkCacheAd = MaxManager.getAd(ads) + if (checkCacheAd == null) { + } else { + MaxManager.setMyListener(checkCacheAd, object : MaxListener { + override fun onFail(ad: MaxAd) { + enterList() + } + override fun onHidden() { + enterList() + } + }) + checkCacheAd.showAd() + } + } + + private fun initTitle() { + binding.homeTitle.text = App.appContext.getString(R.string.app_name) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/SettingFragment.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/SettingFragment.kt new file mode 100644 index 0000000..6cf70ce --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/fragment/SettingFragment.kt @@ -0,0 +1,52 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.fragment + +import android.content.Intent +import android.net.Uri +import android.view.View +import com.sunny.app.soft.timberkeyboardnew.App +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentSettingBinding +import com.sunny.app.soft.timberkeyboardnew.ui.activity.SetKeyboardActivity + +class SettingFragment : BaseFragment(), View.OnClickListener { + + private lateinit var binding: FragmentSettingBinding + override fun setRootView(): View { + binding = FragmentSettingBinding.inflate(layoutInflater) + return binding.root + } + + override fun initView() { + super.initView() + binding.settingLayoutRating.setOnClickListener(this) + binding.settingLayoutShare.setOnClickListener(this) + binding.settingLayoutSetKeyboard.setOnClickListener(this) + } + + override fun onClick(v: View?) { + when (v) { + binding.settingLayoutRating -> { + val url = getString(R.string.link) + App.appContext.packageName + val intent = Intent(Intent.ACTION_VIEW) + intent.setData(Uri.parse(url)) + startActivity(intent) + } + + binding.settingLayoutShare -> { + val url = getString(R.string.link) + App.appContext.packageName + val intent = Intent(Intent.ACTION_SEND) + intent.setType("text/plain") + intent.putExtra(Intent.EXTRA_TEXT, url) + startActivity(intent) + } + + binding.settingLayoutSetKeyboard -> { + val intent = Intent( + requireContext(), + SetKeyboardActivity::class.java + ) + startActivity(intent) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/ApplyListener.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/ApplyListener.kt new file mode 100644 index 0000000..e1731d6 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/ApplyListener.kt @@ -0,0 +1,5 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.listener + +interface ApplyListener { + fun applyListener(isSuccess: Boolean, str: String) +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnBgItemClickListener.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnBgItemClickListener.kt new file mode 100644 index 0000000..ae89c55 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnBgItemClickListener.kt @@ -0,0 +1,8 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.listener + +import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity + +interface OnBgItemClickListener { + fun onItemClick(position: Int, backgroundEntity: BackgroundEntity) +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnItemClickListener.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnItemClickListener.kt new file mode 100644 index 0000000..6cdf03a --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/listener/OnItemClickListener.kt @@ -0,0 +1,8 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.listener + +import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity + +interface OnItemClickListener { + fun onItemClick(position: Int, categoryEntity: CategoryEntity) + +} \ No newline at end of file diff --git a/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/view/MyKeyboardView.kt b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/view/MyKeyboardView.kt new file mode 100644 index 0000000..06d04f8 --- /dev/null +++ b/app/src/main/java/com/sunny/app/soft/timberkeyboardnew/ui/view/MyKeyboardView.kt @@ -0,0 +1,322 @@ +package com.sunny.app.soft.timberkeyboardnew.ui.view + +import android.annotation.SuppressLint +import android.content.Context +import android.content.SharedPreferences +import android.graphics.BitmapFactory +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Paint +import android.graphics.Rect +import android.graphics.drawable.BitmapDrawable +import android.graphics.drawable.Drawable +import android.graphics.drawable.StateListDrawable +import android.inputmethodservice.Keyboard +import android.inputmethodservice.KeyboardView +import android.os.Build +import android.util.AttributeSet +import android.util.Xml +import androidx.annotation.RequiresApi +import androidx.core.content.ContextCompat +import com.sunny.app.soft.timberkeyboardnew.R +import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant +import org.xmlpull.v1.XmlPullParser +import java.io.File +import java.io.StringReader + +@Suppress("DEPRECATION") +class MyKeyboardView @JvmOverloads constructor( + var myContext: Context, + attributeSet: AttributeSet? = null, + style: Int = 0 +) : KeyboardView(myContext, attributeSet, style) { + + inner class MyConfig { + lateinit var functionBackgroundDraw: Drawable + lateinit var spBackgroundDraw: Drawable + lateinit var normalBackgroundDraw: Drawable + var icShittLock: Drawable? = + ContextCompat.getDrawable(context, R.drawable.svg_shift) + var icDel: Drawable? = + ContextCompat.getDrawable(context, R.drawable.svg_delete) + var allBg: Drawable? = + ContextCompat.getDrawable(context, R.mipmap.main_bg) + var icBshift: Drawable? = + ContextCompat.getDrawable(context, R.drawable.svg_shift) + var icSshift: Drawable? = + ContextCompat.getDrawable(context, R.drawable.svg_shift) + + var keycolor: Int = context.resources.getColor(R.color.white33, null) + + private val sp: SharedPreferences = context.getSharedPreferences( + AppConstant.SHARE_NAME, + Context.MODE_PRIVATE + ) + + private fun getbgic(con: Context, filePath: String): Drawable? { + if (!File(filePath).exists()) { + return null + } + return BitmapDrawable(con.resources, BitmapFactory.decodeFile(filePath)) + } + + private fun getStatus(draw: Drawable, drawPress: Drawable): StateListDrawable { + return StateListDrawable().apply { + addState(intArrayOf(android.R.attr.state_pressed), drawPress) + addState(intArrayOf(), draw) + } + } + + private fun gettextcolor(colorXmlPath: String) { + val file = File(colorXmlPath) + if (!file.exists()) return + val xmlP = Xml.newPullParser() + + xmlP.setInput(StringReader(file.readText())) + xmlP.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false) + + var eventT = xmlP.eventType + while (eventT != XmlPullParser.END_DOCUMENT) { + if (eventT == XmlPullParser.START_TAG && (xmlP.name == "color" || xmlP.name == "item")) { + val value = xmlP.getAttributeValue(null, "name") + if (value != null && value == AppConstant.title_color) { + keycolor = Color.parseColor(xmlP.nextText()) + } + } + eventT = xmlP.next() + } + } + + + init { + val default = + ContextCompat.getDrawable(context, R.drawable.png_keybg) + val press = ContextCompat.getDrawable( + context, + R.drawable.png_keybg_press + ) + if (press != null) { + if (default != null) { + val listDrawable = getStatus(default, press) + functionBackgroundDraw = listDrawable + normalBackgroundDraw = listDrawable + spBackgroundDraw = listDrawable + } + } + } + + fun updateConfig(con: Context) { + sp.getString(AppConstant.KEY_CUR_Path, "")?.let { Entity_ID -> + + val unzipPath = "${con.cacheDir}/${Entity_ID}/skin_${Entity_ID}/" + + getbgic( + con, + unzipPath.plus(AppConstant.getnormalBg(Entity_ID)) + )?.let { drawBG -> + getbgic( + con, + unzipPath.plus(AppConstant.getnormalBg(Entity_ID)) + + )?.let { drawPressBG -> + normalBackgroundDraw = getStatus(drawBG, drawPressBG) + } + } + + gettextcolor(Entity_ID.plus(AppConstant.color_path)) + + + + getbgic(con, unzipPath.plus(AppConstant.getnormalBg(Entity_ID)))?.let { drawBG -> + getbgic( + con, + unzipPath.plus(AppConstant.getnormalBg(Entity_ID)) + )?.let { drawPressBG -> + spBackgroundDraw = getStatus(drawBG, drawPressBG) + } + + } + + + + getbgic(con, sp.getString("${AppConstant.KEY_CUR_Path_img}_${Entity_ID}", "")!!)?.run { + allBg = this + } + + + // ok + getbgic( + con, + unzipPath.plus(AppConstant.getFunBg(Entity_ID)) + )?.let { drawBG -> + getbgic( + con, + unzipPath.plus(AppConstant.getFunBg(Entity_ID)) + )?.let { drawPressBG -> + functionBackgroundDraw = getStatus(drawBG, drawPressBG) + } + + } + + + + // ok + getbgic(con, unzipPath.plus(AppConstant.getCaps(Entity_ID)))?.let { + icSshift = it + icBshift = it + } + + + getbgic( + con, + unzipPath.plus(AppConstant.getDeleteRes(Entity_ID)) + )?.let { drawBG -> + icDel = getStatus(drawBG, drawBG) + } + + + getbgic(con, unzipPath.plus(AppConstant.getCapsenable(Entity_ID)))?.let { + icShittLock = it + } + + } + } + } + + var config = MyConfig() + var shiftStatus = AppConstant.Shift_S + var xmlMode = AppConstant.xml0 + + private var myPaint: Paint = Paint().apply { + isAntiAlias = true + textAlign = Paint.Align.CENTER + textSize = myContext.resources.displayMetrics.scaledDensity * 16f + color = config.keycolor + } + + @SuppressLint("SuspiciousIndentation") + private fun andDraw( + myKey: Keyboard.Key, + keyBG: Drawable, + icon: Drawable?, + canvas: Canvas, + ) { + myKey.run { + keyBG.run { + bounds = Rect( + x.plus(paddingLeft), + y.plus(paddingTop), + width.plus(x.plus(paddingLeft)), + height.plus(y.plus(paddingTop)) + ) + state = currentDrawableState + draw(canvas) + } + } + + myKey.run { + icon?.apply { + myKey.icon = this + + var icon_w = myKey.icon.intrinsicWidth.toFloat() + val icon_wr = icon_w / myKey.width.toFloat() + var icon_h = myKey.icon.intrinsicHeight.toFloat() + val icon_hr = icon_h / myKey.height.toFloat() + + + var tep1 = 0f + var tep2 = 0f + if (icon_wr > icon_hr) { + tep2 = icon_wr + tep1 = icon_wr.coerceAtLeast(0.5f) + + } else { + tep2 = icon_hr + tep1 = icon_hr.coerceAtLeast(0.5f) + + } + icon_h = (icon_h / tep2) * tep1 + icon_w = (icon_w / tep2) * tep1 + myKey.icon.let { + it.bounds = Rect().apply { + + top = + (myKey.y + paddingTop + (myKey.height - icon_h) / 2f).toInt() + left = + (myKey.x + paddingLeft + (myKey.width - icon_w) / 2f).toInt() + bottom = (top + icon_h).toInt() + right = (left + icon_w).toInt() + + } + it.draw(canvas) + } + } + + myPaint.color = config.keycolor + if (!label.isNullOrEmpty()) { + val y1 = y.plus(paddingRight).plus((height.div(2f))) + .plus((myPaint.textSize.minus(myPaint.descent())).div(2f)) + val x1 = x.plus(paddingLeft).plus((width.div(2f))) + canvas.drawText(label.toString(), x1, y1, myPaint) + } + } + } + + private fun getCurIc(): Drawable? { + return when (shiftStatus) { + AppConstant.Shift_B_lo -> config.icShittLock + AppConstant.Shift_B -> config.icBshift + AppConstant.Shift_S -> config.icSshift + else -> config.icSshift + } + } + + override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + keyboard.keys.forEach { + when (it.codes[0]) { + Keyboard.KEYCODE_SHIFT -> { + andDraw( + it, + config.functionBackgroundDraw, + getCurIc(), + canvas + ) + } + + AppConstant.SHIFT_NUMBER, AppConstant.SHIFT_SYMBOL -> { + andDraw(it, config.functionBackgroundDraw, null, canvas) + } + + Keyboard.KEYCODE_DELETE -> { + andDraw( + it, + config.functionBackgroundDraw, + config.icDel, + canvas + ) + } + + Keyboard.KEYCODE_MODE_CHANGE, Keyboard.KEYCODE_DONE -> { + andDraw( + it, + config.functionBackgroundDraw, + null, + canvas + ) + } + + else -> { + andDraw(it, config.normalBackgroundDraw, null, canvas) + } + } + } + } + + fun upUi(con: Context) { + config.updateConfig(con) + background = config.allBg + invalidate() + } + +} \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/png_item.png b/app/src/main/res/drawable/png_item.png new file mode 100644 index 0000000..02194cd Binary files /dev/null and b/app/src/main/res/drawable/png_item.png differ diff --git a/app/src/main/res/drawable/png_keybg.9.png b/app/src/main/res/drawable/png_keybg.9.png new file mode 100644 index 0000000..fcf5166 Binary files /dev/null and b/app/src/main/res/drawable/png_keybg.9.png differ diff --git a/app/src/main/res/drawable/png_keybg_press.9.png b/app/src/main/res/drawable/png_keybg_press.9.png new file mode 100644 index 0000000..b3f2727 Binary files /dev/null and b/app/src/main/res/drawable/png_keybg_press.9.png differ diff --git a/app/src/main/res/drawable/png_setting_off.png b/app/src/main/res/drawable/png_setting_off.png new file mode 100644 index 0000000..a15d337 Binary files /dev/null and b/app/src/main/res/drawable/png_setting_off.png differ diff --git a/app/src/main/res/drawable/png_setting_on.png b/app/src/main/res/drawable/png_setting_on.png new file mode 100644 index 0000000..6b06042 Binary files /dev/null and b/app/src/main/res/drawable/png_setting_on.png differ diff --git a/app/src/main/res/drawable/selector_menu.xml b/app/src/main/res/drawable/selector_menu.xml new file mode 100644 index 0000000..021bcfb --- /dev/null +++ b/app/src/main/res/drawable/selector_menu.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/selector_setting.xml b/app/src/main/res/drawable/selector_setting.xml new file mode 100644 index 0000000..79ecfd5 --- /dev/null +++ b/app/src/main/res/drawable/selector_setting.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_r20_white.xml b/app/src/main/res/drawable/shape_r20_white.xml new file mode 100644 index 0000000..8a547c9 --- /dev/null +++ b/app/src/main/res/drawable/shape_r20_white.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_r24_grey.xml b/app/src/main/res/drawable/shape_r24_grey.xml new file mode 100644 index 0000000..1b094f3 --- /dev/null +++ b/app/src/main/res/drawable/shape_r24_grey.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_r24_orange.xml b/app/src/main/res/drawable/shape_r24_orange.xml new file mode 100644 index 0000000..b79cdba --- /dev/null +++ b/app/src/main/res/drawable/shape_r24_orange.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_white_keyboard.xml b/app/src/main/res/drawable/shape_white_keyboard.xml new file mode 100644 index 0000000..1e7a91a --- /dev/null +++ b/app/src/main/res/drawable/shape_white_keyboard.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/svg_back.xml b/app/src/main/res/drawable/svg_back.xml new file mode 100644 index 0000000..d92931d --- /dev/null +++ b/app/src/main/res/drawable/svg_back.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_dele.xml b/app/src/main/res/drawable/svg_dele.xml new file mode 100644 index 0000000..1c653c8 --- /dev/null +++ b/app/src/main/res/drawable/svg_dele.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_delete.xml b/app/src/main/res/drawable/svg_delete.xml new file mode 100644 index 0000000..d2b83a3 --- /dev/null +++ b/app/src/main/res/drawable/svg_delete.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_menu_off.xml b/app/src/main/res/drawable/svg_menu_off.xml new file mode 100644 index 0000000..9de1584 --- /dev/null +++ b/app/src/main/res/drawable/svg_menu_off.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/svg_menu_on.xml b/app/src/main/res/drawable/svg_menu_on.xml new file mode 100644 index 0000000..d411c50 --- /dev/null +++ b/app/src/main/res/drawable/svg_menu_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_rating.xml b/app/src/main/res/drawable/svg_rating.xml new file mode 100644 index 0000000..f2fc337 --- /dev/null +++ b/app/src/main/res/drawable/svg_rating.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_setting_off.xml b/app/src/main/res/drawable/svg_setting_off.xml new file mode 100644 index 0000000..db8507c --- /dev/null +++ b/app/src/main/res/drawable/svg_setting_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_setting_on.xml b/app/src/main/res/drawable/svg_setting_on.xml new file mode 100644 index 0000000..6477402 --- /dev/null +++ b/app/src/main/res/drawable/svg_setting_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_share.xml b/app/src/main/res/drawable/svg_share.xml new file mode 100644 index 0000000..1cee7ab --- /dev/null +++ b/app/src/main/res/drawable/svg_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_shift.xml b/app/src/main/res/drawable/svg_shift.xml new file mode 100644 index 0000000..639f9e7 --- /dev/null +++ b/app/src/main/res/drawable/svg_shift.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/svg_shift_lit.xml b/app/src/main/res/drawable/svg_shift_lit.xml new file mode 100644 index 0000000..858c5ef --- /dev/null +++ b/app/src/main/res/drawable/svg_shift_lit.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_download.xml b/app/src/main/res/layout/activity_download.xml new file mode 100644 index 0000000..f6bee09 --- /dev/null +++ b/app/src/main/res/layout/activity_download.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_enable.xml b/app/src/main/res/layout/activity_enable.xml new file mode 100644 index 0000000..89863e4 --- /dev/null +++ b/app/src/main/res/layout/activity_enable.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_loading.xml b/app/src/main/res/layout/activity_loading.xml new file mode 100644 index 0000000..0f0842b --- /dev/null +++ b/app/src/main/res/layout/activity_loading.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..0cc121f --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_select.xml b/app/src/main/res/layout/activity_select.xml new file mode 100644 index 0000000..56f08a6 --- /dev/null +++ b/app/src/main/res/layout/activity_select.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml new file mode 100644 index 0000000..1b1c16f --- /dev/null +++ b/app/src/main/res/layout/fragment_home.xml @@ -0,0 +1,33 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_setting.xml b/app/src/main/res/layout/fragment_setting.xml new file mode 100644 index 0000000..12240de --- /dev/null +++ b/app/src/main/res/layout/fragment_setting.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_background.xml b/app/src/main/res/layout/item_background.xml new file mode 100644 index 0000000..4873516 --- /dev/null +++ b/app/src/main/res/layout/item_background.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_classification.xml b/app/src/main/res/layout/item_classification.xml new file mode 100644 index 0000000..232d667 --- /dev/null +++ b/app/src/main/res/layout/item_classification.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/view_input.xml b/app/src/main/res/layout/view_input.xml new file mode 100644 index 0000000..6e3796f --- /dev/null +++ b/app/src/main/res/layout/view_input.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/logo.png b/app/src/main/res/mipmap-xxxhdpi/logo.png new file mode 100644 index 0000000..61bddd7 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/logo.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/main_bg.png b/app/src/main/res/mipmap-xxxhdpi/main_bg.png new file mode 100644 index 0000000..22eb3bf Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/main_bg.png differ diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..0e7d23d --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..c8709cb --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,9 @@ + + + #FF2C2C2C + #FFFFFFFF + #FFFF7530 + #FFFED480 + + #55000000 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..c6b06bb --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,26 @@ + + Custom Keyboard + + Home + Setting + Rate Us + Share App + Set Keyboard + https://play.google.com/store/apps/details?id= + Enable Keyboard + Please follow the steps below to enable the keyboard theme of your choice! + Step 1: Select Keyboard + Step 2: Enable Keyboard + Download and Setting + Set this skin + If the keyboard is not enabled, please set it in the settings + Application successful + Application failed, please try again + + + skin_%s_delete_emoji.png + skin_%s_style_1_btn.9.png + skin_%s_caps_enabled.png + skin_%s_caps_disabled.png + skin_%s_style_1_btn.9.png + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..358d65a --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,9 @@ + + + + +