接 Topon 1.0.1(2)
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
*.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
|
||||
.idea/
|
||||
app/release/coolkeyboard_v1.0.1(2)_07_26_15_20-release.apk
|
||||
app/release/coolkeyboard_v1.0.1(2)_07_26_15_45-release.aab
|
||||
app/release/coolkeyboard_v1.0.1(2)_07_26_16_14-release.aab
|
||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
132
app/build.gradle.kts
Normal file
@ -0,0 +1,132 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id ("kotlin-kapt")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
}
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
namespace = "com.key.coolkeyboard"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.key.coolkeyboard"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 2
|
||||
versionName = "1.0.1"
|
||||
setProperty("archivesBaseName", "coolkeyboard_v" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isShrinkResources =true
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
buildFeatures{
|
||||
viewBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||
|
||||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
implementation("com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02")
|
||||
val room_version = "2.6.1"
|
||||
implementation("androidx.room:room-runtime:$room_version")
|
||||
annotationProcessor("androidx.room:room-compiler:$room_version")
|
||||
kapt("androidx.room:room-compiler:$room_version")
|
||||
implementation("androidx.room:room-ktx:$room_version")
|
||||
implementation("androidx.room:room-rxjava2:$room_version")
|
||||
implementation("androidx.room:room-rxjava3:$room_version")
|
||||
implementation("androidx.room:room-guava:$room_version")
|
||||
testImplementation("androidx.room:room-testing:$room_version")
|
||||
implementation("androidx.room:room-paging:$room_version")
|
||||
implementation ("io.github.youth5201314:banner:2.2.3")
|
||||
|
||||
|
||||
|
||||
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
|
||||
implementation("com.google.firebase:firebase-analytics-ktx")
|
||||
implementation("com.google.firebase:firebase-crashlytics-ktx")
|
||||
|
||||
|
||||
//-----------------------------------------------TopOn(pangle、IronSource、mintegral、unityads、liftoff(vungle)、Bigo)
|
||||
//Anythink (Necessary)
|
||||
implementation("com.anythink.sdk:core-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:nativead-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:banner-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:interstitial-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:rewardedvideo-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:splash-tpn:6.3.68")
|
||||
|
||||
//Androidx (Necessary)
|
||||
implementation("androidx.appcompat:appcompat:1.1.0")
|
||||
implementation("androidx.browser:browser:1.4.0")
|
||||
|
||||
//Vungle
|
||||
implementation("com.anythink.sdk:adapter-tpn-vungle:6.3.68")
|
||||
implementation("com.vungle:vungle-ads:7.3.2")
|
||||
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
//UnityAds
|
||||
implementation("com.anythink.sdk:adapter-tpn-unityads:6.3.68")
|
||||
implementation("com.unity3d.ads:unity-ads:4.9.3")
|
||||
|
||||
//Ironsource
|
||||
implementation("com.anythink.sdk:adapter-tpn-ironsource:6.3.68")
|
||||
implementation("com.ironsource.sdk:mediationsdk:8.1.0")
|
||||
implementation("com.google.android.gms:play-services-appset:16.0.2")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||
|
||||
//Bigo
|
||||
implementation("com.anythink.sdk:adapter-tpn-bigo:6.3.68")
|
||||
implementation("com.bigossp:bigo-ads:4.7.4")
|
||||
|
||||
//Pangle
|
||||
implementation("com.anythink.sdk:adapter-tpn-pangle-nonchina:6.3.68.1")
|
||||
implementation( "com.pangle.global:ads-sdk:6.0.0.3")
|
||||
implementation( "com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
//Mintegral
|
||||
implementation("com.anythink.sdk:adapter-tpn-mintegral-nonchina:6.3.68")
|
||||
implementation("com.mbridge.msdk.oversea:reward:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:newinterstitial:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbnative:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbnativeadvanced:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbsplash:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbbanner:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbbid:16.7.51")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
|
||||
//Tramini
|
||||
implementation("com.anythink.sdk:tramini-plugin-tpn:6.3.68")
|
||||
|
||||
// Debugger UI Tools
|
||||
// implementation ("com.anythink.sdk:debugger-ui:1.0.7")
|
||||
|
||||
//----------------------------------------------TopOn
|
||||
|
||||
}
|
||||
BIN
app/coolkeyboard.jks
Normal file
BIN
app/coolkeyboardtest.jks
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "121856077377",
|
||||
"project_id": "cool-keyboard---theme-skin",
|
||||
"storage_bucket": "cool-keyboard---theme-skin.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:121856077377:android:4af5d308b9b1e5cb40a0c0",
|
||||
"android_client_info": {
|
||||
"package_name": "com.key.coolkeyboard"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDPedGEIveqCZHzyAc8ElNrdQi2d_PzJSE"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
129
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
# 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
|
||||
-keepclassmembers class com.key.coolkeyboard.CoolKeyboardSkin{
|
||||
public static final java.lang.String DB_Name;
|
||||
public static final int DB_Version;
|
||||
}
|
||||
-keepclassmembers class *{
|
||||
@androidx.room.Query <methods>;
|
||||
}
|
||||
|
||||
-keep class com.key.coolkeyboard.data.MydataBase { *; }
|
||||
-keep class com.key.coolkeyboard.data.MyDAO { *; }
|
||||
-keep class com.key.coolkeyboard.data.Otherdata { *; }
|
||||
-keep class com.omicronapplications.** { *; }
|
||||
-keep class net.sf.sevenzipjbinding.** { *; }
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------Topon
|
||||
# Vungle
|
||||
-dontwarn com.vungle.ads.**
|
||||
-keepclassmembers class com.vungle.ads.** {
|
||||
*;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Google
|
||||
-keep class com.google.android.gms.** { *; }
|
||||
-dontwarn com.google.android.gms.**
|
||||
|
||||
|
||||
|
||||
|
||||
# START OkHttp + Okio
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
|
||||
-dontwarn okhttp3.internal.platform.**
|
||||
-dontwarn org.conscrypt.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
-dontwarn org.openjsse.**
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# END OkHttp + Okio
|
||||
|
||||
|
||||
# START Protobuf
|
||||
-dontwarn com.google.protobuf.**
|
||||
-keepclassmembers class com.google.protobuf.** {
|
||||
*;
|
||||
}
|
||||
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||
|
||||
|
||||
# END Protobuf
|
||||
-keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface {
|
||||
public *;
|
||||
}
|
||||
-keepclassmembers class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
-keep public class com.google.android.gms.ads.** {
|
||||
public *;
|
||||
}
|
||||
-keep class com.ironsource.adapters.** { *;
|
||||
}
|
||||
-dontwarn com.ironsource.mediationsdk.**
|
||||
-dontwarn com.ironsource.adapters.**
|
||||
-keepattributes JavascriptInterface
|
||||
-keepclassmembers class * {
|
||||
@android.webkit.JavascriptInterface <methods>;
|
||||
}
|
||||
-keep class com.bytedance.sdk.** { *; }
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class com.mbridge.** {*; }
|
||||
-keep interface com.mbridge.** {*; }
|
||||
-keep class android.support.v4.** { *; }
|
||||
-dontwarn com.mbridge.**
|
||||
-keep class **.R$* { public static final int mbridge*; }
|
||||
-keep public class com.mbridge.* extends androidx.** { *; }
|
||||
-keep public class androidx.viewpager.widget.PagerAdapter{ *; }
|
||||
-keep public class androidx.viewpager.widget.ViewPager.OnPageChangeListener{ *; }
|
||||
-keep interface androidx.annotation.IntDef{ *; }
|
||||
-keep interface androidx.annotation.Nullable{ *; }
|
||||
-keep interface androidx.annotation.CheckResult{ *; }
|
||||
-keep interface androidx.annotation.NonNull{ *; }
|
||||
-keep public class androidx.fragment.app.Fragment{ *; }
|
||||
-keep public class androidx.core.content.FileProvider{ *; }
|
||||
-keep public class androidx.core.app.NotificationCompat{ *; }
|
||||
-keep public class androidx.appcompat.widget.AppCompatImageView { *; }
|
||||
-keep public class androidx.recyclerview.*{ *; }
|
||||
#---------------------------------------------Topon
|
||||
|
||||
20
app/release/output-metadata.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.key.coolkeyboard",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 2,
|
||||
"versionName": "1.0.1",
|
||||
"outputFile": "coolkeyboard_v1.0.1(2)_07_26_15_20-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.key.coolkeyboard;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.key.coolkeyboard", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
60
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:name=".CoolKeyboardSkin"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/logo"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".activity.SplashActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.AllActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SerachActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SettingActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.PreviewActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:exported="true" />
|
||||
|
||||
<service
|
||||
android:name=".keyboard.KeyboardService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_INPUT_METHOD">
|
||||
<intent-filter>
|
||||
<action android:name="android.view.InputMethod" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.view.im"
|
||||
android:resource="@xml/im" />
|
||||
</service>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/main/assets/Baumans-Regular.ttf
Normal file
5554
app/src/main/assets/keyboard.json
Normal file
203
app/src/main/java/com/key/coolkeyboard/CoolKeyboardSkin.java
Normal file
@ -0,0 +1,203 @@
|
||||
package com.key.coolkeyboard;
|
||||
|
||||
import static android.content.ContentValues.TAG;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
import com.anythink.core.api.ATSDK;
|
||||
import com.anythink.core.api.NetTrafficeCallback;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.key.coolkeyboard.data.Mydata;
|
||||
import com.key.coolkeyboard.data.MydataBase;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class CoolKeyboardSkin extends Application {
|
||||
public static CoolKeyboardSkin app;
|
||||
public static final String VERSION_NAME = "1.0.0";
|
||||
public static final String DB_Name = "keyboard_database";
|
||||
public static final String Table_Name = "keyboard_table";
|
||||
public static final int DB_Version = 1;
|
||||
private static Context context;
|
||||
public static List<Mydata> mydataList;
|
||||
private static boolean insert;
|
||||
private SharedPreferences sp;
|
||||
private SharedPreferences.Editor editor;
|
||||
private static final String PRE_NAME = "Mypre";
|
||||
private static final String PRE_KEY = "isinsert";
|
||||
public static List<Otherdata> alllist = new ArrayList<>();
|
||||
public static List<Otherdata> lovelist = new ArrayList<>();
|
||||
public static List<Otherdata> coollist = new ArrayList<>();
|
||||
public static List<Otherdata> cutelist = new ArrayList<>();
|
||||
public static List<Otherdata> neonlist = new ArrayList<>();
|
||||
public static List<Otherdata> festivallist = new ArrayList<>();
|
||||
public static List<Otherdata> gravitylist = new ArrayList<>();
|
||||
public static List<Otherdata> aestheticlist = new ArrayList<>();
|
||||
public static List<Otherdata> superlist = new ArrayList<>();
|
||||
|
||||
|
||||
public static List<Otherdata> getLovelist() {
|
||||
return lovelist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getCoollist() {
|
||||
return coollist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getCutelist() {
|
||||
return cutelist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getNeonlist() {
|
||||
return neonlist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getFestivallist() {
|
||||
return festivallist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getGravitylist() {
|
||||
return gravitylist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getAestheticlist() {
|
||||
return aestheticlist;
|
||||
}
|
||||
|
||||
public static List<Otherdata> getSuperlist() {
|
||||
return superlist;
|
||||
}
|
||||
|
||||
private static final String TOP_ID = "h66a23adb0da69";
|
||||
private static final String TOP_KEY = "ad31a3e8504709d2642bc5c311c254bcd";
|
||||
private static final String TOP_DEBUG = "8a341b6aa5cc3fa453d7741f01a534c1d5dd766a";
|
||||
public static List<ATInterstitial> ads;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
app = this;
|
||||
context = getApplicationContext();
|
||||
mydataList = Mytool.parseJsonToList("keyboard.json");
|
||||
|
||||
|
||||
ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
||||
|
||||
@Override
|
||||
public void onResultCallback(boolean isEU) {
|
||||
Log.e(TAG, "onResultCallback:" + isEU);
|
||||
if (isEU && ATSDK.getGDPRDataLevel(context) == ATSDK.UNKNOWN) {
|
||||
ATSDK.showGdprAuth(context);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onErrorCallback(String errorMsg) {
|
||||
Log.e(TAG, "onErrorCallback:" + errorMsg);
|
||||
}
|
||||
});
|
||||
|
||||
initSdk();
|
||||
|
||||
|
||||
sp = getSharedPreferences(PRE_NAME, MODE_PRIVATE);
|
||||
insert = sp.getBoolean(PRE_KEY, false);
|
||||
if (!insert) {
|
||||
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
insert = true;
|
||||
MydataBase.getInstance().myDAO().insertAll(getAlldataList());
|
||||
editor = sp.edit();
|
||||
editor.putBoolean(PRE_KEY, insert);
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
initData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initSdk() {
|
||||
|
||||
// ATSDK.integrationChecking(context);
|
||||
|
||||
ATSDK.init(context, TOP_ID, TOP_KEY);
|
||||
|
||||
ads = Mytool.getAllAd();
|
||||
// ATSDK.setNetworkLogDebug(true);
|
||||
// ATDebuggerUITest.showDebuggerUI(context,TOP_DEBUG);
|
||||
|
||||
}
|
||||
|
||||
public static List<ATInterstitial> lodAd() {
|
||||
|
||||
return ads;
|
||||
}
|
||||
|
||||
|
||||
private void initData() {
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
alllist = MydataBase.getInstance().myDAO().getAll();
|
||||
lovelist = MydataBase.getInstance().myDAO().getotherlist("love");
|
||||
coollist = MydataBase.getInstance().myDAO().getotherlist("cool");
|
||||
cutelist = MydataBase.getInstance().myDAO().getotherlist("cute");
|
||||
neonlist = MydataBase.getInstance().myDAO().getotherlist("neon");
|
||||
festivallist = MydataBase.getInstance().myDAO().getotherlist("festival");
|
||||
gravitylist = MydataBase.getInstance().myDAO().getotherlist("gravity");
|
||||
aestheticlist = MydataBase.getInstance().myDAO().getotherlist("aesthetic");
|
||||
superlist = MydataBase.getInstance().myDAO().getotherlist("super theme");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static List<Otherdata> getAlllist() {
|
||||
|
||||
return alllist;
|
||||
}
|
||||
|
||||
public static List<Mydata> getMydataList() {
|
||||
return mydataList;
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
|
||||
public static List<Otherdata> getAlldataList() {
|
||||
List<Otherdata> otherdata = new ArrayList<>();
|
||||
List<Mydata> mydataList = getMydataList();
|
||||
Set<String> set = new HashSet<>();
|
||||
for (Mydata mydata : mydataList) {
|
||||
List<Otherdata> otherdataList = mydata.getList();
|
||||
for (Otherdata otherdata1 : otherdataList) {
|
||||
String title = otherdata1.getTitle();
|
||||
if (!set.contains(title)) {
|
||||
otherdata.add(otherdata1);
|
||||
set.add(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return otherdata;
|
||||
}
|
||||
|
||||
}
|
||||
168
app/src/main/java/com/key/coolkeyboard/activity/AllActivity.java
Normal file
@ -0,0 +1,168 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.anythink.core.api.AdError;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.adapter.PageAdapter;
|
||||
import com.key.coolkeyboard.databinding.ActivityAllBinding;
|
||||
import com.key.coolkeyboard.fragment.AllFragment;
|
||||
import com.key.coolkeyboard.tool.Adcallback;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AllActivity extends AppCompatActivity {
|
||||
ActivityAllBinding binding;
|
||||
private String[] listtext = {"ALL", "Love", "Cool", "Cute", "Neon", "Festival", "Gravity", "Aesthetic", "Super Theme"};
|
||||
private PageAdapter adapter;
|
||||
private List<Fragment> list = new ArrayList<>();
|
||||
private TextView tabtext;
|
||||
private List<ATInterstitial> ads;
|
||||
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityAllBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_all), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
ads = CoolKeyboardSkin.lodAd();
|
||||
initView();
|
||||
|
||||
initEvent();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void showAd() {
|
||||
ATInterstitial mInterstitialAd = Mytool.onCache(ads);
|
||||
if (mInterstitialAd == null) {
|
||||
finish();
|
||||
} else {
|
||||
Mytool.setCallback(mInterstitialAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(AdError ad) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
mInterstitialAd.show(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.allBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showAd();
|
||||
}
|
||||
});
|
||||
|
||||
binding.allSearch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(AllActivity.this, SerachActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
for (String s : listtext) {
|
||||
list.add(AllFragment.newInstance(s));
|
||||
}
|
||||
|
||||
adapter = new PageAdapter(getSupportFragmentManager(), list);
|
||||
|
||||
binding.allViewpager.setAdapter(adapter);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
TabLayout.Tab tab = binding.allTabLayout.newTab();
|
||||
binding.allTabLayout.addTab(tab);
|
||||
View customView = LayoutInflater.from(this).inflate(R.layout.item_tablayout, null);
|
||||
tabtext = customView.findViewById(R.id.tab_text);
|
||||
tabtext.setText(listtext[i]);
|
||||
customView.setBackgroundResource(R.drawable.all_selector);
|
||||
tab.setCustomView(customView);
|
||||
// tab.setCustomView(LayoutInflater.from(this).inflate(R.layout.item_tablayout, null));
|
||||
final int finalI = i;
|
||||
tab.view.setOnClickListener(v -> {
|
||||
binding.allViewpager.setCurrentItem(finalI);
|
||||
});
|
||||
}
|
||||
|
||||
binding.allViewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
setTabIcons(position);
|
||||
binding.allTabLayout.setScrollPosition(position, 0, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void setTabIcons(int position) {
|
||||
for (int i = 0; i < binding.allTabLayout.getTabCount(); i++) {
|
||||
TabLayout.Tab tab = binding.allTabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
tab.getCustomView().findViewById(R.id.tab_text).setSelected(i == position);
|
||||
View customView = tab.getCustomView();
|
||||
if (i == position) {
|
||||
customView.setBackgroundResource(R.drawable.all_tab_check);
|
||||
} else {
|
||||
customView.setBackgroundResource(R.drawable.all_tab_uncheck);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.adapter.PageAdapter;
|
||||
import com.key.coolkeyboard.databinding.ActivityMainBinding;
|
||||
import com.key.coolkeyboard.fragment.LikeFragment;
|
||||
import com.key.coolkeyboard.fragment.MainFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
ActivityMainBinding binding;
|
||||
private List<Fragment> list = new ArrayList<>();
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
;
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
list.add(new MainFragment());
|
||||
list.add(new LikeFragment());
|
||||
PageAdapter adapter = new PageAdapter(getSupportFragmentManager(),list);
|
||||
binding.mainViewpager.setAdapter(adapter);
|
||||
binding.mainTabLayout.setupWithViewPager(binding.mainViewpager);
|
||||
setmainTabIcons(binding.mainTabLayout);
|
||||
binding.mainViewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
setTabIcons(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void setTabIcons(final int position) {
|
||||
for (int i = 0; i < binding.mainTabLayout.getTabCount(); i++) {
|
||||
final TabLayout.Tab tab = binding.mainTabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
tab.setIcon(position == 0 ? R.drawable.home_check : R.drawable.home_uncheck);
|
||||
break;
|
||||
case 1:
|
||||
tab.setIcon(position == 1 ? R.drawable.like_check : R.drawable.like_uncheck);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setmainTabIcons(TabLayout tabLayout) {
|
||||
for (int i = 0; i < tabLayout.getTabCount(); i++) {
|
||||
TabLayout.Tab tab = tabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
tab.setIcon(R.drawable.home_check);
|
||||
break;
|
||||
case 1:
|
||||
tab.setIcon(R.drawable.like_uncheck);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,214 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import static com.key.coolkeyboard.CoolKeyboardSkin.getContext;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.anythink.core.api.AdError;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.data.MydataBase;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.databinding.ActivityPreviewBinding;
|
||||
import com.key.coolkeyboard.tool.Adcallback;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.StaticValue;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class PreviewActivity extends AppCompatActivity {
|
||||
ActivityPreviewBinding binding;
|
||||
private String name, preview, url, unzipPath;
|
||||
private Otherdata otherdata;
|
||||
private Boolean islike = false;
|
||||
private List<ATInterstitial> ads;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityPreviewBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_preview), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
ads = CoolKeyboardSkin.lodAd();
|
||||
|
||||
Intent intent = getIntent();
|
||||
preview = intent.getStringExtra(StaticValue.KEY_PRE);
|
||||
name = intent.getStringExtra(StaticValue.KEY_NAME);
|
||||
url = intent.getStringExtra(StaticValue.KEY_URL);
|
||||
|
||||
initData();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void showAd() {
|
||||
ATInterstitial mInterstitialAd = Mytool.onCache(ads);
|
||||
if (mInterstitialAd == null) {
|
||||
finish();
|
||||
} else {
|
||||
Mytool.setCallback(mInterstitialAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(AdError ad) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
mInterstitialAd.show(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
|
||||
binding.previewBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
binding.download.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
downLoad();
|
||||
}
|
||||
});
|
||||
|
||||
binding.previewIslike.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkLike();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void checkLike() {
|
||||
if (!islike) {
|
||||
binding.previewIslike.setBackgroundResource(R.drawable.icon_prelike_check);
|
||||
islike = true;
|
||||
otherdata.setIslike(true);
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().myDAO().update(otherdata);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
binding.previewIslike.setBackgroundResource(R.drawable.icon_prelike_uncheck);
|
||||
islike = false;
|
||||
otherdata.setIslike(false);
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().myDAO().update(otherdata);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void downLoad() {
|
||||
if (!Mytool.isStep1() || !Mytool.isStep2()) {
|
||||
// Toast.makeText(this, getString(R.string.text_hint), Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(this, SettingActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
binding.downloadProgress.setVisibility(View.VISIBLE);
|
||||
binding.downloadImage.setVisibility(View.GONE);
|
||||
binding.downloadText.setVisibility(View.GONE);
|
||||
Mytool.donwnZip(this, url, (successful, resource) -> {
|
||||
if (successful) {
|
||||
Mytool.unZip(this, unzipPath, resource, (successful1, resDirPath) -> {
|
||||
if (successful1) {
|
||||
StaticValue.PATH = resDirPath;
|
||||
Toast.makeText(PreviewActivity.this, getString(R.string.set_successful), Toast.LENGTH_SHORT).show();
|
||||
|
||||
showAd();
|
||||
} else {
|
||||
Toast.makeText(PreviewActivity.this, getString(R.string.text_zip_failed), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(PreviewActivity.this, getString(R.string.text_download_failed), Toast.LENGTH_SHORT).show();
|
||||
binding.downloadImage.setVisibility(View.VISIBLE);
|
||||
binding.downloadText.setVisibility(View.VISIBLE);
|
||||
binding.downloadProgress.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
binding.previewTitle.setTypeface(Typeface.createFromAsset(getAssets(), "Baumans-Regular.ttf"));
|
||||
binding.previewTitle.setText(name);
|
||||
binding.imageProgress.setVisibility(View.VISIBLE);
|
||||
binding.previewImage.setVisibility(View.GONE);
|
||||
binding.downloadProgress.setVisibility(View.GONE);
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Otherdata> existingData = MydataBase.getInstance().myDAO().checklikelist(preview);
|
||||
if (!existingData.isEmpty()) {
|
||||
otherdata = existingData.get(0);
|
||||
islike = otherdata.getIslike();
|
||||
if (islike) {
|
||||
binding.previewIslike.setBackgroundResource(R.drawable.icon_prelike_check);
|
||||
} else {
|
||||
binding.previewIslike.setBackgroundResource(R.drawable.icon_prelike_uncheck);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Glide.with(this)
|
||||
.asBitmap()
|
||||
.load(preview)
|
||||
.into(new CustomTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||
binding.previewImage.setImageBitmap(resource);
|
||||
binding.previewImage.setVisibility(View.VISIBLE);
|
||||
binding.imageProgress.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
File cacheDir = this.getCacheDir();
|
||||
unzipPath = cacheDir + "/" + name;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,137 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.adapter.ThumAdapter;
|
||||
import com.key.coolkeyboard.data.MydataBase;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.databinding.ActivitySerachBinding;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.SpaceItem;
|
||||
import com.key.coolkeyboard.tool.StaticValue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SerachActivity extends AppCompatActivity {
|
||||
ActivitySerachBinding binding;
|
||||
private String text;
|
||||
private final SpaceItem spaceItem = new SpaceItem(12, 12, 12);
|
||||
private List<Otherdata> searchdata = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySerachBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_search), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
|
||||
Intent intent = getIntent();
|
||||
text = intent.getStringExtra(StaticValue.KEY_TEXT);
|
||||
binding.searcRv.addItemDecoration(spaceItem);
|
||||
|
||||
search(text);
|
||||
initData();
|
||||
initEvent();
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.searchBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
binding.searchSearch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
search(binding.searchEdit.getText().toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
|
||||
binding.faile.setVisibility(View.GONE);
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
binding.searchEdit.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void hideKeyView() {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(binding.searchEdit.getWindowToken(), 0);
|
||||
binding.searchEdit.clearFocus();
|
||||
}
|
||||
|
||||
private void search(String text) {
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
binding.faile.setText(R.string.text_tips);
|
||||
binding.faile.setVisibility(View.VISIBLE);
|
||||
binding.searcRv.setVisibility(View.GONE);
|
||||
} else {
|
||||
|
||||
binding.searchEdit.setText(text);
|
||||
binding.faile.setVisibility(View.GONE);
|
||||
binding.searcRv.setVisibility(View.VISIBLE);
|
||||
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
searchdata = MydataBase.getInstance().myDAO().getSearchData(text);
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (searchdata.isEmpty()) {
|
||||
binding.faile.setText(R.string.text_null);
|
||||
binding.faile.setVisibility(View.VISIBLE);
|
||||
binding.searcRv.setVisibility(View.GONE);
|
||||
} else {
|
||||
binding.faile.setVisibility(View.GONE);
|
||||
binding.searcRv.setVisibility(View.VISIBLE);
|
||||
binding.searcRv.setAdapter(new ThumAdapter(SerachActivity.this, searchdata));
|
||||
binding.searcRv.setLayoutManager(new GridLayoutManager(SerachActivity.this, 2));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
hideKeyView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
hideKeyView();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.databinding.ActivitySettingBinding;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
|
||||
public class SettingActivity extends AppCompatActivity {
|
||||
ActivitySettingBinding binding;
|
||||
private static final InputMethodManager methodManager = (InputMethodManager) CoolKeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySettingBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_setting), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
binding.settingTitle.setTypeface(Typeface.createFromAsset(getAssets(), "Baumans-Regular.ttf"));
|
||||
|
||||
|
||||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
binding.step1.setSelected(Mytool.isStep1());
|
||||
binding.step2.setSelected(Mytool.isStep2());
|
||||
intImage();
|
||||
}
|
||||
};
|
||||
registerReceiver(broadcastReceiver, new IntentFilter(Intent.ACTION_INPUT_METHOD_CHANGED));
|
||||
initEvent();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
|
||||
binding.settingBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
binding.step1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
binding.step2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
methodManager.showInputMethodPicker();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void intImage() {
|
||||
if (Mytool.isStep2()) {
|
||||
binding.step2Image.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.step2Image.setVisibility(View.GONE);
|
||||
}
|
||||
if (Mytool.isStep1()) {
|
||||
binding.step1Image.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.step1Image.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
binding.step1.setSelected(Mytool.isStep1());
|
||||
binding.step2.setSelected(Mytool.isStep2());
|
||||
intImage();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
package com.key.coolkeyboard.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.anythink.core.api.AdError;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.databinding.ActivityPreviewBinding;
|
||||
import com.key.coolkeyboard.databinding.ActivitySplashBinding;
|
||||
import com.key.coolkeyboard.tool.Adcallback;
|
||||
import com.key.coolkeyboard.tool.CustomProgressBar;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
ActivitySplashBinding binding;
|
||||
private CountDownTimer countDownTimer;
|
||||
private List<ATInterstitial> ads;
|
||||
|
||||
public static boolean isAlreadyShow = false;
|
||||
private float i = 0;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_splash), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
ads = CoolKeyboardSkin.lodAd();
|
||||
|
||||
binding.splashTitle.setTypeface(Typeface.createFromAsset(getAssets(), "Baumans-Regular.ttf"));
|
||||
|
||||
countDownTimer = new CountDownTimer(10100, 100) {
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
i++;
|
||||
binding.splashPg.setProgress(i);
|
||||
if (!isAlreadyShow) {
|
||||
showAd(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!isAlreadyShow) {
|
||||
showAd(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
countDownTimer.start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void showAd(boolean go) {
|
||||
ATInterstitial mInterstitialAd = Mytool.onCache(ads);
|
||||
if (mInterstitialAd == null) {
|
||||
isAlreadyShow = false;
|
||||
if (go) {
|
||||
starMainactivity();
|
||||
}
|
||||
} else {
|
||||
isAlreadyShow = true;
|
||||
Mytool.setCallback(mInterstitialAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(AdError ad) {
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
starMainactivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
isAlreadyShow = true;
|
||||
starMainactivity();
|
||||
}
|
||||
});
|
||||
mInterstitialAd.show(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void starMainactivity() {
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.key.coolkeyboard.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import com.key.coolkeyboard.fragment.LikeFragment;
|
||||
import com.key.coolkeyboard.fragment.MainFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageAdapter extends FragmentStatePagerAdapter {
|
||||
private List<Fragment> fragmentList ;
|
||||
|
||||
public PageAdapter(@NonNull FragmentManager fm,List<Fragment> list ) {
|
||||
super(fm);
|
||||
fragmentList = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return fragmentList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragmentList.size();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.key.coolkeyboard.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.activity.PreviewActivity;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.StaticValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ThumAdapter extends RecyclerView.Adapter<ThumAdapter.ThumVH> {
|
||||
private Context myContext;
|
||||
private List<Otherdata> myDataList;
|
||||
|
||||
public ThumAdapter(Context context, List<Otherdata> list) {
|
||||
myContext = context;
|
||||
myDataList = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ThumVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(myContext).inflate(R.layout.image_list, parent, false);
|
||||
return new ThumVH(view);
|
||||
}
|
||||
|
||||
@SuppressLint("ResourceType")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ThumVH holder, int position) {
|
||||
Otherdata myData = myDataList.get(position);
|
||||
|
||||
|
||||
|
||||
String thumbnail = myData.getThumb();
|
||||
Glide.with(myContext)
|
||||
.load(thumbnail)
|
||||
.placeholder(R.color.pre_load_color)
|
||||
.transform(new RoundedCorners(Mytool.dp2Px(12)))
|
||||
.into(holder.getImageViewThumb());
|
||||
holder.getConstraintLayout().setOnClickListener(v -> {
|
||||
Intent intent = new Intent(myContext, PreviewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_NAME, myData.getTitle());
|
||||
intent.putExtra(StaticValue.KEY_URL, myData.getZipUrl());
|
||||
intent.putExtra(StaticValue.KEY_PRE, myData.getPreview());
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
myContext.startActivity(intent);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return myDataList.size();
|
||||
}
|
||||
|
||||
public class ThumVH extends RecyclerView.ViewHolder {
|
||||
private ImageView imageViewThumb;
|
||||
private ConstraintLayout constraintLayout;
|
||||
|
||||
public ThumVH(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
imageViewThumb = itemView.findViewById(R.id.image_view_thumb_id);
|
||||
constraintLayout = itemView.findViewById(R.id.constraint_layout_id);
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
|
||||
public ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.key.coolkeyboard.callback;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface DownloadCallback {
|
||||
|
||||
void onDownloadCall(boolean successful, File resource) throws IOException;
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.key.coolkeyboard.callback;
|
||||
|
||||
public interface UnzipCallback {
|
||||
|
||||
void onUnzipCall(boolean successful, String resDirPath);
|
||||
}
|
||||
35
app/src/main/java/com/key/coolkeyboard/data/MyDAO.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.key.coolkeyboard.data;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface MyDAO {
|
||||
@Query("SELECT * FROM keyboard_table")
|
||||
List<Otherdata> getAll();
|
||||
|
||||
@Query("select * from keyboard_table where title =:title ")
|
||||
List<Otherdata> getsearchlist(String title);
|
||||
|
||||
@Query("select * from keyboard_table where preview =:pre ")
|
||||
List<Otherdata> checklikelist(String pre);
|
||||
|
||||
@Query("select * from keyboard_table where className =:classname ")
|
||||
List<Otherdata> getotherlist(String classname);
|
||||
|
||||
@Query("SELECT * FROM keyboard_table WHERE islike = :islike")
|
||||
List<Otherdata> getlikelist(boolean islike);
|
||||
|
||||
@Query("SELECT * FROM keyboard_table WHERE title LIKE '%' || :title || '%'")
|
||||
List<Otherdata> getSearchData(String title);
|
||||
|
||||
@Insert
|
||||
void insertAll(List<Otherdata> likeDataList);
|
||||
|
||||
@Update
|
||||
void update(Otherdata otherdata);
|
||||
}
|
||||
24
app/src/main/java/com/key/coolkeyboard/data/Mydata.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.key.coolkeyboard.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
public class Mydata {
|
||||
public String name;
|
||||
private List<Otherdata> list =new ArrayList<>();
|
||||
|
||||
public List<Otherdata> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<Otherdata> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
36
app/src/main/java/com/key/coolkeyboard/data/MydataBase.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.key.coolkeyboard.data;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
|
||||
|
||||
@Database(entities = {Otherdata.class}, version = CoolKeyboardSkin.DB_Version, exportSchema = false)
|
||||
public abstract class MydataBase extends RoomDatabase {
|
||||
public abstract MyDAO myDAO();
|
||||
|
||||
private static MydataBase INSTANCE;
|
||||
|
||||
public static MydataBase getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (MydataBase.class) {
|
||||
INSTANCE = Room.databaseBuilder(CoolKeyboardSkin.getContext(), MydataBase.class, CoolKeyboardSkin.DB_Name).build();
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
// public static MydataBase getInstance() {
|
||||
// if (INSTANCE == null) {
|
||||
// synchronized (MydataBase.class) {
|
||||
// if (INSTANCE == null) {
|
||||
// INSTANCE = Room.databaseBuilder(CoolKeyboardSkin.getContext(), MydataBase.class, CoolKeyboardSkin.DB_Name).build();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return INSTANCE;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
81
app/src/main/java/com/key/coolkeyboard/data/Otherdata.java
Normal file
@ -0,0 +1,81 @@
|
||||
package com.key.coolkeyboard.data;
|
||||
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Entity(tableName = CoolKeyboardSkin.Table_Name)
|
||||
public class Otherdata {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
public int id;
|
||||
public String preview;
|
||||
public String thumb;
|
||||
public String className;
|
||||
public String title;
|
||||
public String zipUrl;
|
||||
public Boolean islike;
|
||||
public String getPreview() {
|
||||
return preview;
|
||||
}
|
||||
|
||||
public void setPreview(String preview) {
|
||||
this.preview = preview;
|
||||
}
|
||||
|
||||
public String getThumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public void setThumb(String thumb) {
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getZipUrl() {
|
||||
return zipUrl;
|
||||
}
|
||||
|
||||
public void setZipUrl(String zipUrl) {
|
||||
this.zipUrl = zipUrl;
|
||||
}
|
||||
|
||||
public Boolean getIslike() {
|
||||
return islike;
|
||||
}
|
||||
|
||||
public void setIslike(Boolean islike) {
|
||||
this.islike = islike;
|
||||
}
|
||||
|
||||
|
||||
public List<Otherdata> filterByName(String input, List<Otherdata> dataList) {
|
||||
List<Otherdata> filteredList = new ArrayList<>();
|
||||
for (Otherdata data : dataList) {
|
||||
if (data.getTitle().toLowerCase().contains(input.toLowerCase())) {
|
||||
filteredList.add(data);
|
||||
}
|
||||
}
|
||||
return filteredList;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.key.coolkeyboard.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.adapter.ThumAdapter;
|
||||
import com.key.coolkeyboard.databinding.FragmentAllBinding;
|
||||
import com.key.coolkeyboard.tool.SpaceItem;
|
||||
|
||||
public class AllFragment extends Fragment {
|
||||
FragmentAllBinding binding;
|
||||
private String tabargs;
|
||||
private ThumAdapter thumAdapter;
|
||||
private SpaceItem spaceItem = new SpaceItem(12, 12, 12);
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentAllBinding.inflate(inflater, container, false);
|
||||
|
||||
|
||||
initData();
|
||||
|
||||
|
||||
return binding.getRoot();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
tabargs = getArguments().getString("tab");
|
||||
if (tabargs.equals("ALL")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getAlllist());
|
||||
} else if (tabargs.equals("Love")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getLovelist());
|
||||
} else if (tabargs.equals("Cool")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getCoollist());
|
||||
} else if (tabargs.equals("Cute")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getCutelist());
|
||||
} else if (tabargs.equals("Neon")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getNeonlist());
|
||||
} else if (tabargs.equals("Festival")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getFestivallist());
|
||||
} else if (tabargs.equals("Gravity")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getGravitylist());
|
||||
} else if (tabargs.equals("Aesthetic")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getAestheticlist());
|
||||
} else if (tabargs.equals("Super Theme")) {
|
||||
thumAdapter = new ThumAdapter(requireContext(), CoolKeyboardSkin.getSuperlist());
|
||||
}
|
||||
binding.allRv.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
binding.allRv.setAdapter(thumAdapter);
|
||||
binding.allRv.addItemDecoration(spaceItem);
|
||||
}
|
||||
|
||||
public static AllFragment newInstance(String pos) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
AllFragment fragment = new AllFragment();
|
||||
args.putString("tab", pos);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.key.coolkeyboard.fragment;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.adapter.ThumAdapter;
|
||||
import com.key.coolkeyboard.data.MydataBase;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.databinding.FragmentLikeBinding;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.SpaceItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class LikeFragment extends Fragment {
|
||||
FragmentLikeBinding binding;
|
||||
private SpaceItem spaceItem = new SpaceItem(12, 12, 12);
|
||||
private List<Otherdata> likelist = new ArrayList<>();
|
||||
private ThumAdapter thumAdapter;
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentLikeBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.likeTitle.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Baumans-Regular.ttf"));
|
||||
binding.nolikeText.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Baumans-Regular.ttf"));
|
||||
|
||||
initData();
|
||||
binding.likeRv.addItemDecoration(spaceItem);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
|
||||
Mytool.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
likelist = MydataBase.getInstance().myDAO().getlikelist(true);
|
||||
requireActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (likelist.isEmpty()) {
|
||||
binding.likeHintImage.setVisibility(View.VISIBLE);
|
||||
binding.nolikeText.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.likeHintImage.setVisibility(View.GONE);
|
||||
binding.nolikeText.setVisibility(View.GONE);
|
||||
}
|
||||
thumAdapter = new ThumAdapter(requireContext(), likelist);
|
||||
binding.likeRv.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
binding.likeRv.setAdapter(thumAdapter);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
initData();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,222 @@
|
||||
package com.key.coolkeyboard.fragment;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.activity.AllActivity;
|
||||
import com.key.coolkeyboard.activity.MainActivity;
|
||||
import com.key.coolkeyboard.activity.PreviewActivity;
|
||||
import com.key.coolkeyboard.activity.SerachActivity;
|
||||
import com.key.coolkeyboard.activity.SettingActivity;
|
||||
import com.key.coolkeyboard.adapter.ThumAdapter;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
import com.key.coolkeyboard.databinding.FragmentMainBinding;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.SpaceItem;
|
||||
import com.key.coolkeyboard.tool.StaticValue;
|
||||
import com.youth.banner.adapter.BannerImageAdapter;
|
||||
import com.youth.banner.holder.BannerImageHolder;
|
||||
import com.youth.banner.indicator.CircleIndicator;
|
||||
import com.youth.banner.listener.OnBannerListener;
|
||||
import com.youth.banner.transformer.DepthPageTransformer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MainFragment extends Fragment {
|
||||
FragmentMainBinding binding;
|
||||
private List<Otherdata> bannerrandomlist = new ArrayList<>();
|
||||
private List<Otherdata> mainrandomlist = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentMainBinding.inflate(inflater, container, false);
|
||||
|
||||
// binding.mainEdit.clearFocus();
|
||||
// binding.mainEdit.setFocusable(false);
|
||||
// binding.mainEdit.setFocusableInTouchMode(false);
|
||||
|
||||
|
||||
initData();
|
||||
initEvent();
|
||||
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
|
||||
binding.mainSetting.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
binding.mainDrawerLayout.openDrawer(GravityCompat.START);
|
||||
}
|
||||
});
|
||||
|
||||
binding.settingCons.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), SettingActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
binding.shareCons.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent share = new Intent(Intent.ACTION_SEND);
|
||||
share.setType("text/plain");
|
||||
share.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name);
|
||||
String text = getString(R.string.share_title);
|
||||
text = text + "\n https://play.google.com/store/apps/details?id=" + "com.key.coolkeyboard";
|
||||
share.putExtra(Intent.EXTRA_TEXT, text);
|
||||
startActivity(Intent.createChooser(share, "choose one"));
|
||||
}
|
||||
});
|
||||
|
||||
binding.privacyCons.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = getString(R.string.privacy_url);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
binding.minSearch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String text = binding.mainEdit.getText().toString();
|
||||
hideKeyboard();
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
Intent intent = new Intent(requireContext(), SerachActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TEXT, text);
|
||||
intent.putExtra(StaticValue.KEY_ISMAINSH, text);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
Toast.makeText(requireContext(), getString(R.string.text_tips), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
binding.mainViewAll.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), AllActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
|
||||
binding.mainTitle.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Baumans-Regular.ttf"));
|
||||
binding.settingTitle.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "Baumans-Regular.ttf"));
|
||||
|
||||
initBanner();
|
||||
initMainrv();
|
||||
|
||||
}
|
||||
|
||||
private void initMainrv() {
|
||||
|
||||
List<Otherdata> mainrvdataList = generateRandomOtherdata(0, 20);
|
||||
for (Otherdata data : mainrvdataList) {
|
||||
if (mainrandomlist.size() < 20) {
|
||||
mainrandomlist.add(data);
|
||||
}
|
||||
}
|
||||
binding.mainRv.setAdapter(new ThumAdapter(requireContext(), mainrandomlist));
|
||||
binding.mainRv.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
SpaceItem spaceItem = new SpaceItem(16, 16, 16);
|
||||
binding.mainRv.addItemDecoration(spaceItem);
|
||||
}
|
||||
|
||||
private void initBanner() {
|
||||
|
||||
List<Otherdata> bannerdataList = generateRandomOtherdata(0, 5);
|
||||
for (Otherdata data : bannerdataList) {
|
||||
if (bannerrandomlist.size() < 5) {
|
||||
bannerrandomlist.add(data);
|
||||
}
|
||||
}
|
||||
|
||||
binding.mainBanner.setAdapter(new BannerImageAdapter<Otherdata>(bannerrandomlist) {
|
||||
@Override
|
||||
public void onBindView(BannerImageHolder holder, Otherdata data, int position, int size) {
|
||||
ImageView imageView = holder.imageView;
|
||||
Glide.with(requireContext())
|
||||
.load(data.getPreview())
|
||||
.placeholder(R.color.pre_load_color)
|
||||
.into(imageView);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
}
|
||||
});
|
||||
|
||||
binding.mainBanner.setOnBannerListener(new OnBannerListener() {
|
||||
@Override
|
||||
public void OnBannerClick(Object data, int position) {
|
||||
Otherdata otherdata = bannerrandomlist.get(position);
|
||||
String url = otherdata.getZipUrl();
|
||||
String pre = otherdata.getPreview();
|
||||
String name = otherdata.getTitle();
|
||||
Intent intent = new Intent(requireContext(), PreviewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_PRE, pre);
|
||||
intent.putExtra(StaticValue.KEY_URL, url);
|
||||
intent.putExtra(StaticValue.KEY_NAME, name);
|
||||
requireContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
binding.mainBanner.setIndicator(new CircleIndicator(requireContext()));
|
||||
binding.mainBanner.setBannerRound(10);
|
||||
binding.mainBanner.setIndicatorRadius(100);
|
||||
binding.mainBanner.setPageTransformer(new DepthPageTransformer());
|
||||
}
|
||||
|
||||
private static List<Otherdata> generateRandomOtherdata(int star, int end) {
|
||||
List<Otherdata> allOtherdata = CoolKeyboardSkin.getAlldataList();
|
||||
Collections.shuffle(allOtherdata);
|
||||
return allOtherdata.subList(star, end);
|
||||
}
|
||||
|
||||
private void hideKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager) requireContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(binding.mainEdit.getWindowToken(), 0);
|
||||
binding.mainEdit.clearFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
hideKeyboard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
hideKeyboard();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,180 @@
|
||||
package com.key.coolkeyboard.keyboard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.StateListDrawable;
|
||||
import android.util.Xml;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.StaticValue;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CustomViewConfig {
|
||||
private String Bg_action_normal = "btn_keyboard_key_functional_normal.9.png";
|
||||
private String jpg_BG = "keyboard_background.jpg";
|
||||
private String color_normal_key = "key_text_color_normal";
|
||||
private String color_action_key = "key_text_color_functional";
|
||||
private String Bg_pressed = "btn_keyboard_key_normal_pressed.9.png";
|
||||
private String Bg_normal = "btn_keyboard_key_normal_normal.9.png";
|
||||
private String path_drawxh = "/drawable-xhdpi-v4/";
|
||||
private String path_drawxxh = "/drawable-xxhdpi-v4/";
|
||||
private String path_color = "/colors.xml";
|
||||
private String icon_del = "sym_keyboard_delete_normal.png";
|
||||
private String icon_shift = "sym_keyboard_shift.png";
|
||||
private String Bg_action_pressed = "btn_keyboard_key_functional_pressed.9.png";
|
||||
private String icon_shift_lock = "sym_keyboard_shift_locked.png";
|
||||
|
||||
private String Bg_space_normal = "btn_keyboard_spacekey_normal_normal.9.png";
|
||||
private String Bg_space_pressed = "btn_keyboard_spacekey_normal_pressed.9.png";
|
||||
|
||||
private Drawable BgActionDraw;
|
||||
private Drawable BgSpaceDraw;
|
||||
private Drawable BgNormalDraw;
|
||||
|
||||
private Drawable iconShift = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
private Drawable iconDel = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.icon_del);
|
||||
private Drawable BG = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.color.black);
|
||||
|
||||
private int keyNoramlcolor = CoolKeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
|
||||
private int keyActioncolor = CoolKeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
|
||||
private Drawable iconShiftLock = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
|
||||
|
||||
public Drawable getBG() {
|
||||
return BG;
|
||||
}
|
||||
|
||||
public Drawable getBgActionDraw() {
|
||||
return BgActionDraw;
|
||||
}
|
||||
|
||||
public Drawable getBgNormalDraw() {
|
||||
return BgNormalDraw;
|
||||
}
|
||||
|
||||
public Drawable getBgSpaceDraw() {
|
||||
return BgSpaceDraw;
|
||||
}
|
||||
|
||||
public Drawable getIconDel() {
|
||||
return iconDel;
|
||||
}
|
||||
|
||||
public Drawable getIconShift() {
|
||||
return iconShift;
|
||||
}
|
||||
|
||||
public Drawable getIconShiftLock() {
|
||||
return iconShiftLock;
|
||||
}
|
||||
|
||||
public int getKeyNoramlcolor() {
|
||||
return keyNoramlcolor;
|
||||
}
|
||||
|
||||
|
||||
public int getKeyActioncolor() {
|
||||
return keyActioncolor;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
// iconShift = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
// iconDel = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.icon_del);
|
||||
// BG = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.color.white);
|
||||
// keyNoramlcolor = CoolKeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
// iconShiftLock = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
// Drawable drawable1 = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.de_keybg_press);
|
||||
// Drawable drawable = ContextCompat.getDrawable(CoolKeyboardSkin.app, R.drawable.de_keybg);
|
||||
// StateListDrawable status = Mytool.getStatus(drawable, drawable1);
|
||||
// BgActionDraw = status;
|
||||
// BgNormalDraw = status;
|
||||
// BgSpaceDraw = status;
|
||||
}
|
||||
|
||||
private Drawable getKeyBackGround(Context context, String resDirPath, String drawName) {
|
||||
String filePath = resDirPath + path_drawxh + drawName;
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
||||
BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), BitmapFactory.decodeFile(filePath));
|
||||
return bitmapDrawable;
|
||||
}
|
||||
|
||||
private Drawable getBackGround(Context context, String resDirPath) {
|
||||
String filePath = resDirPath + path_drawxxh + jpg_BG;
|
||||
if (!new File(filePath).exists()) {
|
||||
return null;
|
||||
}
|
||||
BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(), BitmapFactory.decodeFile(filePath));
|
||||
return bitmapDrawable;
|
||||
}
|
||||
|
||||
private void updateKeyColor(String resDirPath) {
|
||||
|
||||
String colorXmlPath = resDirPath + path_color;
|
||||
File file = new File(colorXmlPath);
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
XmlPullParser xmlPullParser = Xml.newPullParser();
|
||||
|
||||
String s = Mytool.fileToString(file);
|
||||
xmlPullParser.setInput(new StringReader(s));
|
||||
int eventT = xmlPullParser.getEventType();
|
||||
while (eventT != XmlPullParser.END_DOCUMENT) {
|
||||
if (eventT == XmlPullParser.START_TAG && (Objects.equals(xmlPullParser.getName(), "color") || Objects.equals(xmlPullParser.getName(), "item"))) {
|
||||
String value = xmlPullParser.getAttributeValue(null, "name");
|
||||
if (value.equals(color_normal_key)) {
|
||||
keyNoramlcolor = Color.parseColor(xmlPullParser.nextText());
|
||||
|
||||
}
|
||||
if (value.equals(color_action_key)) {
|
||||
keyActioncolor = Color.parseColor(xmlPullParser.nextText());
|
||||
|
||||
}
|
||||
}
|
||||
eventT = xmlPullParser.next();
|
||||
}
|
||||
} catch (XmlPullParserException exception) {
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void updateConfig(Context con) {
|
||||
String resDirPath = StaticValue.PATH;
|
||||
if (!resDirPath.isEmpty()) {
|
||||
updateKeyColor(resDirPath);
|
||||
BG = getBackGround(con, resDirPath);
|
||||
BgNormalDraw = getKeyBackGround(con, resDirPath, Bg_normal);
|
||||
BgActionDraw = getKeyBackGround(con, resDirPath, Bg_action_normal);
|
||||
BgSpaceDraw = getKeyBackGround(con, resDirPath, Bg_space_normal);
|
||||
iconDel = getKeyBackGround(con, resDirPath, icon_del);
|
||||
iconShift = getKeyBackGround(con, resDirPath, icon_shift);
|
||||
iconShiftLock = getKeyBackGround(con, resDirPath, icon_shift_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.key.coolkeyboard.keyboard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
import android.inputmethodservice.KeyboardView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import com.key.coolkeyboard.R;
|
||||
|
||||
|
||||
public class KeyboardService extends InputMethodService implements KeyboardView.OnKeyboardActionListener {
|
||||
private int[] ViewXmls = new int[4];
|
||||
private MyKeyboard myKeyboard;
|
||||
|
||||
public KeyboardService() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateInputView() {
|
||||
ViewXmls[0] = R.xml.view_1;
|
||||
ViewXmls[1] = R.xml.view_2;
|
||||
ViewXmls[2] = R.xml.view_3;
|
||||
ViewXmls[3] = R.xml.view_4;
|
||||
|
||||
View inputView = LayoutInflater.from(this).inflate(R.layout.keyboard_view, null, false);
|
||||
myKeyboard = inputView.findViewById(R.id.keyboardView);
|
||||
myKeyboard.setKeyboard(new MyKeyboard.KeyBoard(this, ViewXmls[0]));
|
||||
myKeyboard.setOnKeyboardActionListener(this);
|
||||
// myKeyboard.setPreviewEnabled(false);
|
||||
return inputView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowShown() {
|
||||
super.onWindowShown();
|
||||
myKeyboard.updateConfigView(this);
|
||||
myKeyboard.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPress(int primaryCode) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRelease(int primaryCode) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKey(int primaryCode, int[] keyCodes) {
|
||||
|
||||
switch (primaryCode) {
|
||||
case MyKeyboard.KeyBoard.KEYCODE_SHIFT:
|
||||
if (myKeyboard.getShiftType() == 0) {
|
||||
changeView(3);
|
||||
myKeyboard.setShiftType(1);
|
||||
} else {
|
||||
changeView(0);
|
||||
myKeyboard.setShiftType(0);
|
||||
}
|
||||
break;
|
||||
case MyKeyboard.KeyBoard.KEYCODE_MODE_CHANGE:
|
||||
if (myKeyboard.getViewType() == 0) {
|
||||
changeView(1);
|
||||
} else {
|
||||
changeView(0);
|
||||
}
|
||||
break;
|
||||
case MyKeyboard.KeyBoard.KEYCODE_SHIFT_123:
|
||||
changeView(1);
|
||||
break;
|
||||
case MyKeyboard.KeyBoard.KEYCODE_SHIFT_MORE:
|
||||
changeView(2);
|
||||
break;
|
||||
case MyKeyboard.KeyBoard.KEYCODE_DELETE:
|
||||
getCurrentInputConnection().deleteSurroundingText(1, 0);
|
||||
break;
|
||||
case MyKeyboard.KeyBoard.KEYCODE_DONE:
|
||||
getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_DONE);
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(myKeyboard.getWindowToken(), 0);
|
||||
break;
|
||||
default:
|
||||
char value;
|
||||
if (myKeyboard.getShiftType() == 1) {
|
||||
value = Character.toUpperCase((char) primaryCode);
|
||||
} else {
|
||||
value = (char) primaryCode;
|
||||
}
|
||||
getCurrentInputConnection().commitText(String.valueOf(value), 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void changeView(int i) {
|
||||
myKeyboard.setViewType(i);
|
||||
myKeyboard.setShiftType(i);
|
||||
myKeyboard.setKeyboard(new MyKeyboard.KeyBoard(this, ViewXmls[i]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onText(CharSequence text) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swipeLeft() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swipeRight() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swipeDown() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swipeUp() {
|
||||
|
||||
}
|
||||
}
|
||||
144
app/src/main/java/com/key/coolkeyboard/keyboard/MyKeyboard.java
Normal file
@ -0,0 +1,144 @@
|
||||
package com.key.coolkeyboard.keyboard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.inputmethodservice.KeyboardView;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
|
||||
import com.key.coolkeyboard.tool.Mytool;
|
||||
import com.key.coolkeyboard.tool.drawIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MyKeyboard extends KeyboardView {
|
||||
private Paint mPaint;
|
||||
private int viewType = 0;
|
||||
private int shiftType = 0;
|
||||
private CustomViewConfig config;
|
||||
|
||||
public MyKeyboard(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initView();
|
||||
}
|
||||
|
||||
public static class KeyBoard extends Keyboard {
|
||||
|
||||
public static final int KEYCODE_SHIFT_MORE = -360;
|
||||
public static final int KEYCODE_SHIFT_123 = -361;
|
||||
|
||||
public KeyBoard(Context context, int layoutTemplateResId) {
|
||||
super(context, layoutTemplateResId);
|
||||
}
|
||||
}
|
||||
|
||||
public int getShiftType() {
|
||||
return shiftType;
|
||||
}
|
||||
|
||||
public void setShiftType(int shiftType) {
|
||||
this.shiftType = shiftType;
|
||||
}
|
||||
|
||||
public void setViewType(int viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
|
||||
public int getViewType() {
|
||||
return viewType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
KeyBoard keyboard = (KeyBoard) getKeyboard();
|
||||
List<Keyboard.Key> keys = keyboard.getKeys();
|
||||
for (int r = 0; r < keys.size(); r++) {
|
||||
Keyboard.Key key = keys.get(r);
|
||||
int code = key.codes[0];
|
||||
mPaint.setColor(config.getKeyActioncolor());
|
||||
if (code == KeyBoard.KEYCODE_MODE_CHANGE) {
|
||||
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
onDrawLabel(key, canvas);
|
||||
|
||||
} else if (code == KeyBoard.KEYCODE_SHIFT) {
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
drawIcon.onDrawKeyIcon(key, getShiftDraw(), canvas, this);
|
||||
} else if (code == KeyBoard.KEYCODE_SHIFT_123) {
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
onDrawLabel(key, canvas);
|
||||
|
||||
} else if (code == KeyBoard.KEYCODE_SHIFT_MORE) {
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
onDrawLabel(key, canvas);
|
||||
|
||||
} else if (code == KeyBoard.KEYCODE_DONE) {
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
onDrawLabel(key, canvas);
|
||||
} else if (code == KeyBoard.KEYCODE_DELETE) {
|
||||
onDrawKeyBackground(key, config.getBgActionDraw(), canvas);
|
||||
drawIcon.onDrawKeyIcon(key, config.getIconDel(), canvas, this);
|
||||
onDrawLabel(key, canvas);
|
||||
} else {
|
||||
mPaint.setColor(config.getKeyNoramlcolor());
|
||||
onDrawKeyBackground(key, config.getBgNormalDraw(), canvas);
|
||||
onDrawLabel(key, canvas);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Drawable getShiftDraw() {
|
||||
if (shiftType == 0) {
|
||||
return config.getIconShift();
|
||||
} else {
|
||||
return config.getIconShiftLock();
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
config = new CustomViewConfig();
|
||||
mPaint = new Paint();
|
||||
config.init();
|
||||
float texsize = Mytool.spToPpx(20f, this.getContext());
|
||||
mPaint.setTextSize(texsize);
|
||||
}
|
||||
|
||||
public void updateConfigView(Context con) {
|
||||
config.updateConfig(con);
|
||||
setBackground(config.getBG());
|
||||
invalidateAllKeys();
|
||||
|
||||
}
|
||||
|
||||
private void onDrawKeyBackground(Keyboard.Key myKey,
|
||||
Drawable keyBG,
|
||||
Canvas canvas) {
|
||||
if (keyBG != null) {
|
||||
int left = myKey.x + getPaddingLeft();
|
||||
int top = myKey.y + getPaddingTop();
|
||||
int right = left + myKey.width;
|
||||
int bottom = top + myKey.height;
|
||||
|
||||
keyBG.setBounds(left, top, right, bottom);
|
||||
keyBG.setState(myKey.getCurrentDrawableState());
|
||||
keyBG.draw(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
private void onDrawLabel(
|
||||
Keyboard.Key myKey,
|
||||
Canvas canvas) {
|
||||
boolean b = myKey.label == null || myKey.label == "";
|
||||
if (!b) {
|
||||
float y1 = myKey.y + myKey.height / 2f - (mPaint.descent() + mPaint.ascent()) / 2f;
|
||||
float x1 = myKey.x + getPaddingLeft() + ((myKey.width / 2f));
|
||||
x1 -= mPaint.measureText(myKey.label.toString()) / 2f;
|
||||
canvas.drawText(myKey.label.toString(), x1, y1, mPaint);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.key.coolkeyboard.tool;
|
||||
|
||||
|
||||
import com.anythink.core.api.AdError;
|
||||
|
||||
public interface Adcallback {
|
||||
void onShowFail(AdError ad);
|
||||
void onAdHidden( );
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.key.coolkeyboard.tool
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.LinearGradient
|
||||
import android.graphics.Paint
|
||||
import android.graphics.RectF
|
||||
import android.graphics.Shader
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
|
||||
class CustomProgressBar(context: Context, attrs: AttributeSet?) : View(context, attrs) {
|
||||
private var progress = 0f // 当前进度
|
||||
private val maxProgress = 100f // 最大进度
|
||||
private val progressBarHeight = 20f // 进度条高度
|
||||
private val cornerRadius = 10f // 圆角半径
|
||||
private val backgroundColor = Color.parseColor("#26FFFFFF")
|
||||
private val startColor = Color.parseColor("#FF9ce8ff") // 起始颜色
|
||||
private val middleColor = Color.parseColor("#FFa4c4fb") // 中间颜色
|
||||
private val endColor = Color.parseColor("#FFbfa4ee") // 结束颜色
|
||||
private val paint = Paint()
|
||||
private val paintTow = Paint()
|
||||
|
||||
init {
|
||||
paint.style = Paint.Style.FILL
|
||||
paint.isAntiAlias = true
|
||||
paintTow.style = Paint.Style.FILL
|
||||
paintTow.isAntiAlias = true
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
// 绘制底色矩形
|
||||
paint.shader = null // 重置着色器
|
||||
paint.color = backgroundColor
|
||||
val backgroundRect = RectF(0f, (height / 2 - progressBarHeight / 2), width.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
canvas.drawRoundRect(backgroundRect, cornerRadius, cornerRadius, paint)
|
||||
|
||||
|
||||
// 计算进度条的宽度
|
||||
val progressBarWidth = (width * progress / maxProgress)
|
||||
|
||||
// 创建颜色渐变对象
|
||||
val gradient = LinearGradient(0f, 0f, width.toFloat(), 0f, intArrayOf(startColor, middleColor, endColor), null, Shader.TileMode.CLAMP)
|
||||
paintTow.shader = gradient
|
||||
|
||||
// 绘制带圆角的进度条矩形
|
||||
val rect = RectF(0f, (height / 2 - progressBarHeight / 2), progressBarWidth.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paintTow)
|
||||
}
|
||||
|
||||
fun getProgress():Float{
|
||||
return progress
|
||||
}
|
||||
|
||||
// 设置进度
|
||||
fun setProgress(progress: Float) {
|
||||
this.progress = progress
|
||||
invalidate() // 请求重绘
|
||||
}
|
||||
}
|
||||
335
app/src/main/java/com/key/coolkeyboard/tool/Mytool.java
Normal file
@ -0,0 +1,335 @@
|
||||
package com.key.coolkeyboard.tool;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.StateListDrawable;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.anythink.core.api.ATAdInfo;
|
||||
import com.anythink.core.api.AdError;
|
||||
import com.anythink.interstitial.api.ATInterstitial;
|
||||
import com.anythink.interstitial.api.ATInterstitialListener;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.key.coolkeyboard.CoolKeyboardSkin;
|
||||
import com.key.coolkeyboard.R;
|
||||
import com.key.coolkeyboard.callback.DownloadCallback;
|
||||
import com.key.coolkeyboard.callback.UnzipCallback;
|
||||
import com.key.coolkeyboard.data.Mydata;
|
||||
import com.key.coolkeyboard.data.Otherdata;
|
||||
|
||||
import net.sf.sevenzipjbinding.ArchiveFormat;
|
||||
import net.sf.sevenzipjbinding.IInArchive;
|
||||
import net.sf.sevenzipjbinding.SevenZip;
|
||||
import net.sf.sevenzipjbinding.impl.RandomAccessFileInStream;
|
||||
import net.sf.sevenzipjbinding.impl.RandomAccessFileOutStream;
|
||||
import net.sf.sevenzipjbinding.simple.ISimpleInArchiveItem;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class Mytool {
|
||||
|
||||
private static InputMethodManager methodManager = (InputMethodManager) CoolKeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
private static ExecutorService executorService;
|
||||
|
||||
private static final String one_AD = "n66a23b25d78ba";
|
||||
private static final String two_Ad = "n66a23b25ada67";
|
||||
private static final String three_ad = "n66a23b257ca0e";
|
||||
private static ArrayList<ATInterstitial> adArrayList;
|
||||
|
||||
|
||||
public static void setCallback(ATInterstitial ad, Adcallback adcallback) {
|
||||
ad.setAdListener(new ATInterstitialListener() {
|
||||
@Override
|
||||
public void onInterstitialAdLoaded() {
|
||||
// Log.e("zzj", "---------onInterstitialAdLoaded--------" + ad.mPlacementId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdLoadFail(AdError adError) {
|
||||
// Log.e("zzj", "---------onInterstitialAdLoadFail--------" + adError.getFullErrorInfo());
|
||||
adcallback.onShowFail(adError);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdClicked(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdShow(ATAdInfo atAdInfo) {
|
||||
ad.load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdClose(ATAdInfo atAdInfo) {
|
||||
adcallback.onAdHidden();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoStart(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoEnd(ATAdInfo atAdInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterstitialAdVideoError(AdError adError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static ATInterstitial onCache(List<ATInterstitial> list) {
|
||||
Collections.shuffle(list);
|
||||
for (ATInterstitial ad : list) {
|
||||
if (ad.isAdReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<ATInterstitial> getAllAd() {
|
||||
if (adArrayList == null) {
|
||||
adArrayList = new ArrayList<>();
|
||||
adArrayList.add(createAd(one_AD, CoolKeyboardSkin.app));
|
||||
adArrayList.add(createAd(two_Ad, CoolKeyboardSkin.app));
|
||||
adArrayList.add(createAd(three_ad, CoolKeyboardSkin.app));
|
||||
}
|
||||
for (ATInterstitial ad : adArrayList) {
|
||||
if (!ad.isAdReady()) {
|
||||
setCallback(ad, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(AdError ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
ad.load();
|
||||
}
|
||||
}
|
||||
return adArrayList;
|
||||
}
|
||||
|
||||
private static ATInterstitial createAd(String adUnitId, Context context) {
|
||||
ATInterstitial ad = new ATInterstitial(context, adUnitId);
|
||||
return ad;
|
||||
}
|
||||
|
||||
|
||||
public static void runIO(Runnable task) {
|
||||
getExecutorService().execute(task);
|
||||
}
|
||||
|
||||
private static ExecutorService getExecutorService() {
|
||||
if (executorService == null) {
|
||||
executorService = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
return executorService;
|
||||
}
|
||||
|
||||
public static StateListDrawable getStatus(Drawable draw, Drawable drawPress) {
|
||||
StateListDrawable stateListDrawable = new StateListDrawable();
|
||||
stateListDrawable.addState(new int[android.R.attr.state_pressed], draw);
|
||||
stateListDrawable.addState(new int[0], drawPress);
|
||||
return stateListDrawable;
|
||||
|
||||
}
|
||||
|
||||
public static float spToPpx(Float values, Context context) {
|
||||
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, values, context.getResources().getDisplayMetrics());
|
||||
}
|
||||
|
||||
public static String fileToString(File file) throws IOException {
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
String lin = "";
|
||||
while ((lin = bufferedReader.readLine()) != null) {
|
||||
stringBuilder.append(lin);
|
||||
}
|
||||
bufferedReader.close();
|
||||
String con = stringBuilder.toString();
|
||||
return con;
|
||||
}
|
||||
|
||||
public static void unZip(Context context, String urlpath, File resource, UnzipCallback callback) throws IOException {
|
||||
|
||||
if (!resource.exists()) {
|
||||
Toast.makeText(context, context.getString(R.string.text_download_failed), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
String itemFilePath = "";
|
||||
RandomAccessFile accessFile = new RandomAccessFile(resource, "r");
|
||||
RandomAccessFileInStream inStream = new RandomAccessFileInStream(accessFile);
|
||||
IInArchive iInArchive = SevenZip.openInArchive(ArchiveFormat.SEVEN_ZIP, inStream);
|
||||
|
||||
ISimpleInArchiveItem[] archiveItems = iInArchive.getSimpleInterface().getArchiveItems();
|
||||
for (int d = 0; d < archiveItems.length; d++) {
|
||||
ISimpleInArchiveItem simple = archiveItems[d];
|
||||
File file = new File(urlpath, simple.getPath());
|
||||
if (!simple.isFolder()) {
|
||||
RandomAccessFileOutStream outStream = new RandomAccessFileOutStream(new RandomAccessFile(file, "rw"));
|
||||
simple.extractSlow(outStream);
|
||||
itemFilePath = file.getPath();
|
||||
|
||||
} else {
|
||||
boolean mkdirs = file.mkdirs();
|
||||
}
|
||||
}
|
||||
inStream.close();
|
||||
iInArchive.close();
|
||||
int res = itemFilePath.indexOf("res");
|
||||
String substring = itemFilePath.substring(0, res + 3);
|
||||
callback.onUnzipCall(true, substring);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void donwnZip(Context context, String url, DownloadCallback callback) {
|
||||
Glide.with(context)
|
||||
.asFile()
|
||||
.load(url)
|
||||
.listener(new RequestListener<File>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, @Nullable Object model, @NonNull Target<File> target, boolean isFirstResource) {
|
||||
try {
|
||||
callback.onDownloadCall(false, null);
|
||||
} catch (FileNotFoundException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(@NonNull File resource, @NonNull Object model, Target<File> target, @NonNull DataSource dataSource, boolean isFirstResource) {
|
||||
try {
|
||||
callback.onDownloadCall(true, resource);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).preload();
|
||||
}
|
||||
|
||||
public static boolean isStep2() {
|
||||
String string = Settings.Secure.getString(CoolKeyboardSkin.app.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||
return string.startsWith(CoolKeyboardSkin.app.getPackageName());
|
||||
}
|
||||
|
||||
public static boolean isStep1() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
return methodManager.getEnabledInputMethodList().stream()
|
||||
.anyMatch(inputMethodInfo -> inputMethodInfo.getId().startsWith(CoolKeyboardSkin.app.getPackageName()));
|
||||
} else {
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) CoolKeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
List<InputMethodInfo> inputMethodList = inputMethodManager.getEnabledInputMethodList();
|
||||
if (inputMethodList != null) {
|
||||
for (InputMethodInfo inputMethodInfo : inputMethodList) {
|
||||
if (inputMethodInfo.getId().startsWith(CoolKeyboardSkin.app.getPackageName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static int dp2Px(int dp) {
|
||||
float scale = CoolKeyboardSkin.getContext().getResources().getDisplayMetrics().density;
|
||||
return (int) (dp * scale + 0.5f);
|
||||
}
|
||||
|
||||
private static JSONArray loadJSONFromAsset(String filename) {
|
||||
String json;
|
||||
try {
|
||||
AssetManager assetManager = CoolKeyboardSkin.getContext().getAssets();
|
||||
InputStream inputStream = assetManager.open(filename);
|
||||
int size = inputStream.available();
|
||||
byte[] buffer = new byte[size];
|
||||
inputStream.read(buffer);
|
||||
inputStream.close();
|
||||
json = new String(buffer, StandardCharsets.UTF_8);
|
||||
return new JSONArray(json);
|
||||
} catch (IOException | JSONException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Mydata> parseJsonToList(String filename) {
|
||||
List<Mydata> dataList = new ArrayList<>();
|
||||
try {
|
||||
JSONArray jsonObject = loadJSONFromAsset(filename);
|
||||
for (int a = 0; a < jsonObject.length(); a++) {
|
||||
JSONObject list = jsonObject.getJSONObject(a);
|
||||
Mydata myData = new Mydata();
|
||||
List<Otherdata> otherdataList = new ArrayList<>();
|
||||
myData.setName(list.getString("className"));
|
||||
JSONArray classArray = list.getJSONArray("list");
|
||||
for (int i = 0; i < classArray.length(); i++) {
|
||||
JSONObject item = classArray.getJSONObject(i);
|
||||
Otherdata otherdata = new Otherdata();
|
||||
otherdata.setIslike(false);
|
||||
otherdata.setClassName(myData.getName());
|
||||
otherdata.setPreview(item.getString("preview"));
|
||||
otherdata.setThumb(item.getString("thumb"));
|
||||
otherdata.setTitle(item.getString("title"));
|
||||
otherdata.setZipUrl(item.getString("zipUrl"));
|
||||
otherdataList.add(otherdata);
|
||||
}
|
||||
myData.setList(otherdataList);
|
||||
dataList.add(myData);
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
56
app/src/main/java/com/key/coolkeyboard/tool/SpaceItem.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.key.coolkeyboard.tool;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class SpaceItem extends RecyclerView.ItemDecoration {
|
||||
private int ex_space = 0;
|
||||
private int v_space = 0;
|
||||
private int h_space = 0;
|
||||
|
||||
@Override
|
||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
|
||||
int position = parent.getChildAdapterPosition(view);
|
||||
int spanSize = 1;
|
||||
int spanIndex = 0;
|
||||
int spanCount = 1;
|
||||
|
||||
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
|
||||
|
||||
if (layoutManager instanceof GridLayoutManager) {
|
||||
GridLayoutManager layoutManager1 = (GridLayoutManager) layoutManager;
|
||||
GridLayoutManager.LayoutParams layoutParams = (GridLayoutManager.LayoutParams) view.getLayoutParams();
|
||||
spanCount = layoutManager1.getSpanCount();
|
||||
spanSize = layoutManager1.getSpanSizeLookup().getSpanSize(position);
|
||||
spanIndex = layoutParams.getSpanIndex();
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (spanSize == spanCount) {
|
||||
outRect.left = v_space + ex_space;
|
||||
outRect.right = v_space + ex_space;
|
||||
outRect.bottom = h_space;
|
||||
} else {
|
||||
int itemAllSpacing = (v_space * (spanCount + 1) + ex_space * 2) / spanCount;
|
||||
int left = v_space * (spanIndex + 1) - itemAllSpacing * spanIndex + ex_space;
|
||||
int right = itemAllSpacing - left;
|
||||
outRect.left = left;
|
||||
outRect.right = right;
|
||||
outRect.bottom = h_space;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public SpaceItem(int v_space, int h_space, int ex_space) {
|
||||
this.ex_space = ex_space;
|
||||
this.h_space = h_space;
|
||||
this.v_space = v_space;
|
||||
|
||||
}
|
||||
}
|
||||
10
app/src/main/java/com/key/coolkeyboard/tool/StaticValue.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.key.coolkeyboard.tool;
|
||||
|
||||
public class StaticValue {
|
||||
public static String KEY_NAME = "key_name";
|
||||
public static String KEY_URL = "key_url";
|
||||
public static String KEY_PRE = "key_pre";
|
||||
public static String PATH = "";
|
||||
public static String KEY_TEXT = "";
|
||||
public static String KEY_ISMAINSH = "";
|
||||
}
|
||||
48
app/src/main/java/com/key/coolkeyboard/tool/drawIcon.java
Normal file
@ -0,0 +1,48 @@
|
||||
package com.key.coolkeyboard.tool;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
|
||||
import com.key.coolkeyboard.keyboard.MyKeyboard;
|
||||
|
||||
|
||||
public class drawIcon {
|
||||
public static void onDrawKeyIcon(Keyboard.Key currentKey,
|
||||
Drawable drawKeyIcon,
|
||||
Canvas myCanvas,
|
||||
MyKeyboard myKeyboardView) {
|
||||
currentKey.icon = drawKeyIcon;
|
||||
currentKey.icon.setBounds(calculateIconBounds(currentKey, drawKeyIcon, myKeyboardView));
|
||||
currentKey.icon.draw(myCanvas);
|
||||
}
|
||||
|
||||
private static Rect calculateIconBounds(Keyboard.Key currentKey,
|
||||
Drawable drawKeyIcon,
|
||||
MyKeyboard myKeyboardView) {
|
||||
float icon_w = drawKeyIcon.getIntrinsicWidth();
|
||||
float icon_h = drawKeyIcon.getIntrinsicHeight();
|
||||
float icon_wr = icon_w / currentKey.width;
|
||||
float icon_hr = icon_h / currentKey.height;
|
||||
|
||||
float tep1, tep2;
|
||||
if (icon_wr > icon_hr) {
|
||||
tep2 = icon_wr;
|
||||
tep1 = Math.max(icon_wr, 0.5f);
|
||||
} else {
|
||||
tep2 = icon_hr;
|
||||
tep1 = Math.max(icon_hr, 0.5f);
|
||||
}
|
||||
|
||||
icon_h = (icon_h / tep2) * tep1;
|
||||
icon_w = (icon_w / tep2) * tep1;
|
||||
|
||||
int top = (int) (currentKey.y + myKeyboardView.getPaddingTop() + (currentKey.height - icon_h) / 2);
|
||||
int left = (int) (currentKey.x + myKeyboardView.getPaddingLeft() + (currentKey.width - icon_w) / 2);
|
||||
int bottom = top + (int) icon_h;
|
||||
int right = left + (int) icon_w;
|
||||
|
||||
return new Rect(left, top, right, bottom);
|
||||
}
|
||||
}
|
||||
5
app/src/main/res/drawable/all_selector.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/all_tab_check" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/all_tab_uncheck" android:state_selected="false" />
|
||||
</selector>
|
||||
10
app/src/main/res/drawable/all_tab_check.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/color_main_setting" />
|
||||
<corners android:topLeftRadius="4dp"
|
||||
android:topRightRadius="4dp"
|
||||
android:bottomRightRadius="4dp"
|
||||
android:bottomLeftRadius="4dp"/>
|
||||
</shape>
|
||||
4
app/src/main/res/drawable/all_tab_uncheck.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/all_tabtext_selector.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/color_main_setting" />
|
||||
<item android:color="@color/white" />
|
||||
</selector>
|
||||
10
app/src/main/res/drawable/bg_main_setting.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_main_setting"/>
|
||||
<corners
|
||||
android:topLeftRadius="40dp"
|
||||
android:bottomLeftRadius="40dp"
|
||||
android:bottomRightRadius="40dp"
|
||||
android:topRightRadius="40dp" />
|
||||
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/bg_tablayout.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners
|
||||
android:topLeftRadius="24dp"
|
||||
android:topRightRadius="24dp" />
|
||||
|
||||
</shape>
|
||||
20
app/src/main/res/drawable/home_check.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M3,13.542C3,8.474 3.576,8.828 6.679,6.069C8.037,5.021 10.149,3 11.974,3C13.797,3 15.952,5.011 17.322,6.069C20.424,8.828 21,8.474 21,13.542C21,21 19.161,21 12,21C4.839,21 3,21 3,13.542Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#1B1B1B"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#1B1B1B"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M10,16H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/home_uncheck.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M10,16H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#B1B1B3"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M3,13.542C3,8.474 3.576,8.828 6.679,6.069C8.037,5.021 10.149,3 11.974,3C13.797,3 15.952,5.011 17.322,6.069C20.424,8.828 21,8.474 21,13.542C21,21 19.161,21 12,21C4.839,21 3,21 3,13.542Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#B1B1B3"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ico_shift_lit.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M459.7,155.7l-5.5,4.1 -2.4,2 -3.8,3.5 -2.2,2.2 -3.5,3.8 -258.1,305.9 -4.2,5.4c-28.1,40.2 -20.7,93.3 16,123.6l5.9,4.4 3,2 4.9,2.9 5.6,2.8c13,6.1 26.2,8.9 39.5,8.9l58.6,-0 0,142.6 0.2,6.1c4,48.9 44,85.3 91.9,85.3h212.4l6.1,-0.2 2.7,-0.2 4.8,-0.6 4.7,-0.9c43.4,-9.4 73.7,-46.3 73.7,-89.5l-0,-142.6h58.8l6.1,-0.2c35.6,-2.9 65.4,-24.3 78.7,-55.7a90.9,90.9 0,0 0,-14.2 -94.1L582.4,172.4l-4.6,-5 -1.1,-1.1a92.6,92.6 0,0 0,-117.1 -10.6zM525.3,213.9l2.1,1.8 2.7,2.9 255.9,303.5a21,21 0,0 1,3.4 21.9,22.2 22.2,0 0,1 -18.7,13.3l-3.3,0.1 -127.1,-0v212.4l-0.2,2.6a21.9,21.9 0,0 1,-18.3 18.7l-1.5,0.2 -3.7,0.2L405.6,791.3a22,22 0,0 1,-22.2 -19.9l-0.1,-3.2v-210.9h-128.5l-2.8,-0.2a22.8,22.8 0,0 1,-8 -2.5l-1.7,-1 -3.3,-2.4c-7.4,-6.1 -9.1,-18.4 -2.7,-27.5l2.2,-2.9L494.6,217.4l1.4,-1.5 1.5,-1.3 2.9,-2.2c6.8,-4.6 17.3,-4.1 24.9,1.5z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/icon_all_search.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M2.75,11C2.75,6.444 6.444,2.75 11,2.75C15.556,2.75 19.25,6.444 19.25,11C19.25,15.556 15.556,19.25 11,19.25C6.444,19.25 2.75,15.556 2.75,11Z"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M19,19L22,22"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
13
app/src/main/res/drawable/icon_back.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="15dp"
|
||||
android:height="11dp"
|
||||
android:viewportWidth="15"
|
||||
android:viewportHeight="11">
|
||||
<path
|
||||
android:pathData="M1.167,4.901L4.682,9.383M13.667,4.901H1.167H13.667ZM1.167,4.901L4.682,0.833L1.167,4.901Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_check.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="25dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="25">
|
||||
<path
|
||||
android:pathData="M19.518,6.453C19.262,6.453 18.995,6.537 18.8,6.729L10.093,15.323C9.836,15.576 9.578,15.529 9.376,15.231L6.38,10.811C6.074,10.36 5.434,10.234 4.975,10.535C4.517,10.836 4.389,11.465 4.695,11.916L7.69,16.336C8.592,17.665 10.349,17.834 11.498,16.704L20.236,8.141C20.625,7.757 20.625,7.113 20.236,6.729C20.041,6.537 19.773,6.453 19.518,6.453Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_del.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M830.3,170.3H437.6A178.3,178.3 0,0 0,310.7 223L58.2,475.3a61.5,61.5 0,0 0,0 86.9l252.3,252.3a178.3,178.3 0,0 0,127.1 52.7h392.7A152.9,152.9 0,0 0,983 714.5V323a152.9,152.9 0,0 0,-152.7 -152.7zM760.2,628.8a25.6,25.6 0,0 1,-36.1 36.1L614.1,554.8 504,664.9a25.6,25.6 0,1 1,-36.1 -36.1L578,518.7 467.9,408.5A25.6,25.6 0,1 1,504 372.4l110.1,110.3L724.1,372.4a25.6,25.6 0,0 1,36.1 0,25.6 25.6,0 0,1 0,36.3L650.1,518.7z"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_download.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M14.31,16.38L13,17.64V12C13,11.735 12.895,11.48 12.707,11.293C12.52,11.105 12.265,11 12,11C11.735,11 11.48,11.105 11.293,11.293C11.105,11.48 11,11.735 11,12V17.59L9.71,16.29C9.617,16.197 9.506,16.123 9.384,16.072C9.262,16.022 9.132,15.996 9,15.996C8.868,15.996 8.738,16.022 8.616,16.072C8.494,16.123 8.383,16.197 8.29,16.29C8.197,16.383 8.123,16.494 8.072,16.616C8.022,16.738 7.996,16.868 7.996,17C7.996,17.132 8.022,17.262 8.072,17.384C8.123,17.506 8.197,17.617 8.29,17.71L11.29,20.71C11.383,20.803 11.494,20.876 11.616,20.926C11.738,20.976 11.868,21.001 12,21C12.257,20.999 12.505,20.899 12.69,20.72L15.69,17.82C15.796,17.732 15.883,17.624 15.945,17.501C16.007,17.379 16.044,17.244 16.052,17.107C16.06,16.97 16.039,16.832 15.992,16.703C15.944,16.574 15.871,16.456 15.776,16.357C15.68,16.257 15.566,16.179 15.439,16.126C15.312,16.073 15.175,16.047 15.038,16.049C14.9,16.051 14.764,16.081 14.639,16.139C14.514,16.195 14.402,16.278 14.31,16.38Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M17.67,7C17.262,5.822 16.497,4.799 15.48,4.075C14.464,3.352 13.248,2.963 12,2.963C10.752,2.963 9.536,3.352 8.52,4.075C7.503,4.799 6.738,5.822 6.33,7C5.432,7.121 4.583,7.483 3.874,8.049C3.166,8.614 2.625,9.362 2.308,10.211C1.992,11.061 1.912,11.98 2.078,12.871C2.244,13.762 2.649,14.592 3.25,15.271C3.323,15.398 3.422,15.509 3.543,15.593C3.663,15.678 3.8,15.736 3.945,15.761C4.089,15.787 4.238,15.781 4.38,15.742C4.522,15.704 4.654,15.635 4.766,15.54C4.878,15.445 4.968,15.326 5.029,15.193C5.09,15.059 5.121,14.913 5.12,14.767C5.118,14.62 5.084,14.475 5.02,14.342C4.956,14.21 4.864,14.093 4.75,14C4.363,13.568 4.11,13.033 4.021,12.459C3.933,11.885 4.012,11.299 4.25,10.769C4.488,10.24 4.875,9.791 5.363,9.477C5.851,9.163 6.42,8.998 7,9H7.1C7.334,9.005 7.562,8.928 7.745,8.782C7.928,8.635 8.053,8.43 8.1,8.2C8.284,7.296 8.774,6.483 9.489,5.899C10.203,5.315 11.097,4.996 12.02,4.996C12.943,4.996 13.837,5.315 14.551,5.899C15.266,6.483 15.756,7.296 15.94,8.2C15.987,8.43 16.112,8.635 16.295,8.782C16.478,8.928 16.706,9.005 16.94,9H17C17.58,8.998 18.149,9.163 18.637,9.477C19.125,9.791 19.512,10.24 19.75,10.769C19.988,11.299 20.067,11.885 19.979,12.459C19.89,13.033 19.637,13.568 19.25,14C19.162,14.099 19.094,14.215 19.051,14.34C19.008,14.465 18.99,14.597 18.998,14.729C19.007,14.861 19.041,14.991 19.1,15.109C19.159,15.228 19.24,15.334 19.34,15.42C19.522,15.581 19.757,15.67 20,15.67C20.142,15.67 20.282,15.64 20.412,15.581C20.541,15.523 20.656,15.437 20.75,15.33C21.368,14.653 21.787,13.819 21.962,12.919C22.138,12.019 22.062,11.088 21.744,10.228C21.426,9.369 20.878,8.613 20.16,8.043C19.441,7.474 18.58,7.113 17.67,7Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/icon_main_search.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M2.292,9.167C2.292,5.37 5.37,2.292 9.167,2.292C12.964,2.292 16.042,5.37 16.042,9.167C16.042,12.964 12.964,16.042 9.167,16.042C5.37,16.042 2.292,12.964 2.292,9.167Z"
|
||||
android:strokeWidth="1.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#1B1B1B"/>
|
||||
<path
|
||||
android:pathData="M15.833,15.833L18.333,18.333"
|
||||
android:strokeWidth="1.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#1B1B1B"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
23
app/src/main/res/drawable/icon_prelike_check.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M14.822,4.884C15.324,3.94 16.676,3.94 17.178,4.884L19.786,9.794C19.978,10.157 20.328,10.411 20.732,10.482L26.208,11.445C27.261,11.63 27.679,12.916 26.936,13.685L23.072,17.683C22.786,17.978 22.653,18.389 22.71,18.795L23.487,24.301C23.636,25.359 22.542,26.154 21.581,25.685L16.585,23.246C16.216,23.065 15.784,23.065 15.415,23.246L10.419,25.685C9.458,26.154 8.364,25.359 8.513,24.301L9.29,18.795C9.347,18.389 9.214,17.978 8.928,17.683L5.064,13.685C4.321,12.916 4.739,11.63 5.792,11.445L11.268,10.482C11.672,10.411 12.022,10.157 12.214,9.794L14.822,4.884Z"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#F24180"
|
||||
android:strokeColor="#F24180"/>
|
||||
<path
|
||||
android:pathData="M24,2.667L22.667,6.667"
|
||||
android:strokeWidth="1.33333"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#F24180"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M25.873,7.142L31.206,5.808"
|
||||
android:strokeWidth="1.33333"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#F24180"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/icon_prelike_uncheck.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M14.822,4.884C15.324,3.94 16.676,3.94 17.178,4.884L19.786,9.794C19.978,10.157 20.328,10.411 20.732,10.482L26.208,11.445C27.261,11.63 27.679,12.916 26.936,13.685L23.072,17.683C22.786,17.978 22.653,18.389 22.71,18.795L23.487,24.301C23.636,25.359 22.542,26.154 21.581,25.685L16.585,23.246C16.216,23.065 15.784,23.065 15.415,23.246L10.419,25.685C9.458,26.154 8.364,25.359 8.513,24.301L9.29,18.795C9.347,18.389 9.214,17.978 8.928,17.683L5.064,13.685C4.321,12.916 4.739,11.63 5.792,11.445L11.268,10.482C11.672,10.411 12.022,10.157 12.214,9.794L14.822,4.884Z"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#FFE6EF"
|
||||
android:strokeColor="#FFE5EF"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/icon_privacy.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M21.123,8.824C21.123,20.724 12.51,22.198 12.17,22.311H11.717C11.377,22.311 2.877,20.724 2.877,8.824V5.538C2.877,5.198 2.99,4.858 3.33,4.631C3.557,4.405 3.897,4.291 4.237,4.291H4.917C5.823,4.291 6.843,4.178 7.75,3.951C9.337,3.611 11.037,1.911 11.15,1.911C11.377,1.798 11.603,1.685 11.943,1.685C12.17,1.685 12.51,1.798 12.737,1.911C13.19,2.251 14.777,3.611 16.25,3.951C17.157,4.178 18.063,4.291 19.083,4.291H19.763C20.103,4.291 20.443,4.405 20.67,4.631C20.896,4.858 21.123,5.198 21.123,5.538V8.824Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M8.944,11.333L11.123,13.511C11.24,13.628 11.43,13.628 11.547,13.511L15.766,9.293"
|
||||
android:strokeWidth="1.4"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#7C7E83"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_setting.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M2.9,7.76L3.78,6.236C4.3,5.335 5.466,5.015 6.376,5.54C7.943,6.445 9.224,5.707 9.221,3.892C9.221,2.853 10.074,1.994 11.122,1.999L13.116,2.007C14.035,1.995 14.778,2.747 14.79,3.666L14.79,3.886C14.785,5.695 16.066,6.435 17.639,5.531L17.83,5.421C18.632,4.972 19.655,5.24 20.104,6.042L21.108,7.764C21.636,8.669 21.319,9.838 20.419,10.357C18.846,11.262 18.847,12.74 20.414,13.645C21.315,14.165 21.635,15.331 21.11,16.241L20.229,17.765C19.709,18.666 18.543,18.985 17.634,18.46C16.066,17.555 14.786,18.294 14.789,20.108C14.784,21.156 13.936,22.006 12.887,22.001L10.894,21.994C9.975,22.006 9.232,21.253 9.22,20.334L9.219,20.115C9.225,18.305 7.943,17.565 6.37,18.47L6.18,18.579C5.378,19.028 4.355,18.761 3.905,17.959L2.902,16.236C2.374,15.331 2.691,14.163 3.591,13.643C5.164,12.739 5.163,11.26 3.596,10.355C2.686,9.83 2.38,8.661 2.9,7.76Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M15.25,12C15.25,10.205 13.795,8.75 12,8.75C10.205,8.75 8.75,10.205 8.75,12C8.75,13.795 10.205,15.25 12,15.25C13.795,15.25 15.25,13.795 15.25,12Z"
|
||||
android:fillColor="#7C7E83"/>
|
||||
</vector>
|
||||
16
app/src/main/res/drawable/icon_share.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M6.437,5.958L15.516,2.931C19.589,1.574 21.809,3.794 20.452,7.867L17.426,16.946C15.389,23.056 12.059,23.049 10.029,16.946L9.421,15.108C9.265,14.641 8.749,14.125 8.283,13.969L6.437,13.354C0.335,11.325 0.335,7.987 6.437,5.958Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M9.053,14.33L12.872,10.512L9.053,14.33Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M13.402,9.981C13.695,10.274 13.695,10.749 13.402,11.042L9.584,14.86C9.291,15.153 8.816,15.153 8.523,14.861C8.23,14.568 8.23,14.093 8.523,13.8L12.341,9.981C12.634,9.689 13.109,9.688 13.402,9.981Z"
|
||||
android:fillColor="#7C7E83"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/icon_viewall.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h16v16h-16z"/>
|
||||
<path
|
||||
android:pathData="M6,4L10,8L6,12"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.33333"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="@color/white"
|
||||
android:strokeLineCap="round"/>
|
||||
</group>
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/like_check.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.063,3.589C11.462,2.804 12.538,2.804 12.937,3.589L15.012,7.672C15.165,7.974 15.443,8.184 15.765,8.244L20.122,9.044C20.959,9.198 21.292,10.268 20.701,10.907L17.626,14.231C17.399,14.477 17.293,14.818 17.339,15.156L17.956,19.735C18.075,20.614 17.205,21.275 16.441,20.885L12.465,18.857C12.172,18.707 11.828,18.707 11.535,18.857L7.559,20.885C6.795,21.275 5.925,20.614 6.044,19.735L6.661,15.156C6.707,14.818 6.601,14.477 6.374,14.231L3.299,10.907C2.708,10.268 3.041,9.198 3.878,9.044L8.235,8.244C8.557,8.184 8.835,7.973 8.988,7.672L11.063,3.589Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#1B1B1B"
|
||||
android:strokeColor="#1B1B1B"/>
|
||||
<path
|
||||
android:pathData="M10,16H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/like_uncheck.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.063,3.589C11.462,2.804 12.538,2.804 12.937,3.589L15.012,7.672C15.165,7.974 15.443,8.184 15.765,8.244L20.122,9.044C20.959,9.198 21.292,10.268 20.701,10.907L17.626,14.231C17.399,14.477 17.293,14.818 17.339,15.156L17.956,19.735C18.075,20.614 17.205,21.275 16.441,20.885L12.465,18.857C12.172,18.707 11.828,18.707 11.535,18.857L7.559,20.885C6.795,21.275 5.925,20.614 6.044,19.735L6.661,15.156C6.707,14.818 6.601,14.477 6.374,14.231L3.299,10.907C2.708,10.268 3.041,9.198 3.878,9.044L8.235,8.244C8.557,8.184 8.835,7.973 8.988,7.672L11.063,3.589Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#B1B1B3"/>
|
||||
<path
|
||||
android:pathData="M10,16H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#B1B1B3"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/preview_download_bg.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_main_setting" />
|
||||
<corners
|
||||
android:bottomLeftRadius="28dp"
|
||||
android:bottomRightRadius="28dp"
|
||||
android:topLeftRadius="28dp"
|
||||
android:topRightRadius="28dp" />
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/search_edit.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="67dp"
|
||||
android:bottomRightRadius="67dp"
|
||||
android:topLeftRadius="67dp"
|
||||
android:topRightRadius="67dp" />
|
||||
</shape>
|
||||
11
app/src/main/res/drawable/step_check.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/step_check" />
|
||||
<corners
|
||||
android:bottomLeftRadius="29dp"
|
||||
android:bottomRightRadius="29dp"
|
||||
android:topLeftRadius="29dp"
|
||||
android:topRightRadius="29dp" />
|
||||
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/step_selector.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/step_uncheck" android:state_selected="false" />
|
||||
<item android:drawable="@drawable/step_check" android:state_selected="true" />
|
||||
|
||||
</selector>
|
||||
9
app/src/main/res/drawable/step_uncheck.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_main_setting" />
|
||||
<corners
|
||||
android:bottomLeftRadius="29dp"
|
||||
android:bottomRightRadius="29dp"
|
||||
android:topLeftRadius="29dp"
|
||||
android:topRightRadius="29dp" />
|
||||
</shape>
|
||||
97
app/src/main/res/layout/activity_all.xml
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_all"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:context=".activity.AllActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/all_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/all_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/all_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/all_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/all_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/all_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/all_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/icon_all_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/all_tabLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="11dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/all_title"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:tabMode="scrollable" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/all_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/all_tabLayout" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
32
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activity_main"
|
||||
android:background="@color/black"
|
||||
tools:context=".activity.MainActivity">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="@mipmap/bg_main"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/main_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_tabLayout"
|
||||
android:layout_marginBottom="6dp" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/main_tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_tablayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:tabIndicatorHeight="0dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
129
app/src/main/res/layout/activity_preview.xml
Normal file
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:context=".activity.PreviewActivity">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preview_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_marginStart="16dp"
|
||||
android:id="@+id/preview_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/preview_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/preview_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginEnd="16dp"
|
||||
android:id="@+id/preview_islike"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/icon_prelike_uncheck"
|
||||
app:layout_constraintBottom_toBottomOf="@id/preview_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/preview_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="27dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/preview_title">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/image_progress"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
android:indeterminateTint="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/preview_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/download"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/preview_download_bg"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_cons">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/download_progress"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_image"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/icon_download"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/download_text"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/down_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
102
app/src/main/res/layout/activity_serach.xml
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activity_search"
|
||||
android:background="@color/black"
|
||||
tools:context=".activity.SerachActivity">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:id="@+id/search_cons"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/search_edit"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/search_back"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_search"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_main_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/search_hint_text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/search_text_color"
|
||||
android:textColorHint="@color/search_hint_text_color"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/search_search"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_marginStart="16dp"
|
||||
android:id="@+id/search_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/search_cons"
|
||||
app:layout_constraintTop_toTopOf="@id/search_cons">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_marginTop="20dp"
|
||||
android:id="@+id/searc_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/search_cons" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="20dp"
|
||||
android:id="@+id/faile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/search_text_color"
|
||||
android:textSize="25sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/search_cons" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
145
app/src/main/res/layout/activity_setting.xml
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:context=".activity.SettingActivity">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/setting_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/setting_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/setting_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/setting_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_image"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:src="@mipmap/setting_hint_image"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_title" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/setting_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_hint"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="29sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/setting_image" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/step1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/step_selector"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_hint">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/step1_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@drawable/icon_check"
|
||||
app:layout_constraintBottom_toBottomOf="@id/step1_text"
|
||||
app:layout_constraintStart_toEndOf="@id/step1_text"
|
||||
app:layout_constraintTop_toTopOf="@id/step1_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step1_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/step1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/step2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/step_selector"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/step1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/step2_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@drawable/icon_check"
|
||||
app:layout_constraintBottom_toBottomOf="@id/step2_text"
|
||||
app:layout_constraintStart_toEndOf="@id/step2_text"
|
||||
app:layout_constraintTop_toTopOf="@id/step2_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step2_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/step2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
49
app/src/main/res/layout/activity_splash.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_splash"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_main_setting"
|
||||
tools:context=".activity.SplashActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/splash_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="90dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:src="@mipmap/splash_image"
|
||||
app:layout_constraintBottom_toTopOf="@id/splash_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.key.coolkeyboard.tool.CustomProgressBar
|
||||
android:id="@+id/splash_pg"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/splash_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
14
app/src/main/res/layout/fragment_all.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".fragment.AllFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/all_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
59
app/src/main/res/layout/fragment_like.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:context=".fragment.LikeFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/like_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/favorite_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/like_hint_image"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:src="@mipmap/like_hint_image"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/like_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nolike_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/nolike_tips"
|
||||
android:textColor="@color/search_hint_text_color"
|
||||
android:textSize="25sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/like_hint_image" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/like_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="17dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/like_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
317
app/src/main/res/layout/fragment_main.xml
Normal file
@ -0,0 +1,317 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_DrawerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:openDrawer="start"
|
||||
tools:context=".fragment.MainFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_setting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/bg_main_setting"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/main_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:src="@drawable/icon_setting"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_search_cons"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/search_edit"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/min_search"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_main_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/main_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/search_hint_text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/search_text_color"
|
||||
android:textColorHint="@color/search_hint_text_color"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/min_search"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/banner_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/main_banner_title"
|
||||
android:textColor="@color/color_main_setting"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_search_cons" />
|
||||
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/main_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/for_you"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/text_more"
|
||||
android:textColor="@color/color_main_setting"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_banner" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/for_you"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/for_you">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/view_all"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:background="@drawable/icon_viewall" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/for_you" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@color/black"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/setting_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setting_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="33sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_setting"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/setting_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/setting"
|
||||
app:layout_constraintStart_toEndOf="@id/setting"
|
||||
app:layout_constraintTop_toTopOf="@id/setting" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/icon_viewall"
|
||||
app:layout_constraintBottom_toBottomOf="@id/setting"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/setting" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/share_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_cons">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/share"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_share"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/share_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/share"
|
||||
app:layout_constraintStart_toEndOf="@id/share"
|
||||
app:layout_constraintTop_toTopOf="@id/share" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/icon_viewall"
|
||||
app:layout_constraintBottom_toBottomOf="@id/share"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/share" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/privacy_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/share_cons">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/privacy"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_privacy"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/prevacy_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/privacy"
|
||||
app:layout_constraintStart_toEndOf="@id/privacy"
|
||||
app:layout_constraintTop_toTopOf="@id/privacy" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/icon_viewall"
|
||||
app:layout_constraintBottom_toBottomOf="@id/privacy"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/privacy" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/versionnumver_text"
|
||||
android:textColor="@color/version"
|
||||
android:textSize="17sp"
|
||||
android:id="@+id/version"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
17
app/src/main/res/layout/image_list.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/constraint_layout_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view_thumb_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
22
app/src/main/res/layout/item_tablayout.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/custom_tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@drawable/all_tabtext_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
12
app/src/main/res/layout/keyboard_view.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.key.coolkeyboard.keyboard.MyKeyboard
|
||||
android:id="@+id/keyboardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="210dp" />
|
||||
|
||||
</LinearLayout>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/bg_main.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/like_hint_image.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/logo.png
Normal file
|
After Width: | Height: | Size: 1006 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/setting_hint_image.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/splash_image.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
7
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.CoolKeyboard" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
11
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="pre_load_color">#DEE4FC</color>
|
||||
<color name="search_text_color">#6B6D6F</color>
|
||||
<color name="search_hint_text_color">#B1B1B3</color>
|
||||
<color name="color_main_setting">#F24180</color>
|
||||
<color name="step_check">#CFCFCF</color>
|
||||
<color name="version">#9D9D9D</color>
|
||||
</resources>
|
||||