Max集成 1.0.1(2)
BIN
app/Keyboard _Skins.jks
Normal file
BIN
app/Keyboard _Skinstest.jks
Normal file
66
app/build.gradle.kts
Normal file
@ -0,0 +1,66 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("applovin-quality-service")
|
||||
}
|
||||
applovin{
|
||||
apiKey = "rocvFTS3NWAipuv92m3QDkFeuB8V2Gf9__QrXPB6gIDTqwL4XD81hdZRKDu1hJvMh4gOJCa5dmHRc06wHThQgq"
|
||||
}
|
||||
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
namespace = "com.exquisite.demo08"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.key.keyboardskins"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 2
|
||||
versionName = "1.0.1"
|
||||
setProperty("archivesBaseName", "keyboardskins_V" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources =true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.core:core-ktx:1.13.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.0")
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
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.1.5")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
implementation("com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02")
|
||||
|
||||
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
|
||||
implementation("com.google.firebase:firebase-analytics-ktx")
|
||||
implementation ("com.google.firebase:firebase-crashlytics-ktx")
|
||||
|
||||
implementation("com.applovin:applovin-sdk:+")
|
||||
implementation("com.applovin.mediation:vungle-adapter:+")
|
||||
implementation("com.applovin.mediation:bytedance-adapter:+")
|
||||
|
||||
}
|
||||
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "587788974322",
|
||||
"project_id": "keyboard-skins-51667",
|
||||
"storage_bucket": "keyboard-skins-51667.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:587788974322:android:4bc75ccf9954f4ab3c786b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.key.keyboardskins"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCHtBPf_2Yd1pOivx338mY74-w1lri1LkQ"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
5
app/keyinfo
Normal file
@ -0,0 +1,5 @@
|
||||
pwd:Keyboard _Skins
|
||||
name:Keyboard _Skins.jks
|
||||
alia:Keyboard _Skinskey0
|
||||
包名:
|
||||
应用名:
|
||||
23
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.omicronapplications.** { *; }
|
||||
-keep class net.sf.sevenzipjbinding.** { *; }
|
||||
@ -0,0 +1,26 @@
|
||||
package com.exquisite.demo08;
|
||||
|
||||
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.exquisite.demo08", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
59
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?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.INTERNET" />
|
||||
|
||||
<application
|
||||
android:name="com.exquisite.KeyboardSkin"
|
||||
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="com.exquisite.activity.SearchActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<service
|
||||
android:name="com.exquisite.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>
|
||||
|
||||
<activity
|
||||
android:name="com.exquisite.activity.KeyBoardSettingsActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.exquisite.activity.AllActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.exquisite.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="com.exquisite.activity.PreviewActivity"
|
||||
android:exported="true" />
|
||||
<activity
|
||||
android:name="com.exquisite.activity.MainActivity"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
5554
app/src/main/assets/keyboard.json
Normal file
71
app/src/main/java/com/exquisite/KeyboardSkin.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.exquisite;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.applovin.sdk.AppLovinMediationProvider;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.applovin.sdk.AppLovinSdk.SdkInitializationListener;
|
||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
|
||||
import com.bytedance.sdk.openadsdk.InitConfig;
|
||||
import com.exquisite.activity.MainActivity;
|
||||
import com.exquisite.data.Mydata;
|
||||
import com.exquisite.tools.Mytools;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class KeyboardSkin extends Application {
|
||||
public static KeyboardSkin app;
|
||||
private static Context context;
|
||||
public static List<Mydata> myDataArrayList;
|
||||
private static final String MAX_SDK = "JE7gVeObwAxnnPBv2tb61lNAIEHd4Udk3kac0g2rNpfhmVP0m6PwUH38KLK7yVPblRTBpgFf8ansDbsMtQJ3mx";
|
||||
public static final String AD_BROADCAST = "on_success_action";
|
||||
public static Boolean initSDK = false;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
context = getApplicationContext();
|
||||
app = this;
|
||||
initSDK();
|
||||
List<Mydata> myData = Mytools.parseJsonToList("keyboard.json");
|
||||
myDataArrayList = myData;
|
||||
}
|
||||
|
||||
public static Context getAppContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public static List<Mydata> getMyDataArrayList() {
|
||||
if (myDataArrayList != null) {
|
||||
Collections.shuffle(myDataArrayList);
|
||||
return myDataArrayList;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initSDK() {
|
||||
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder(MAX_SDK, this)
|
||||
.setMediationProvider(AppLovinMediationProvider.MAX)
|
||||
.build();
|
||||
AppLovinSdk.getInstance(this).initialize(initConfig, new SdkInitializationListener() {
|
||||
@Override
|
||||
public void onSdkInitialized(AppLovinSdkConfiguration appLovinSdkConfiguration) {
|
||||
initSDK = true;
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(AD_BROADCAST));
|
||||
}
|
||||
});
|
||||
AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
92
app/src/main/java/com/exquisite/activity/AllActivity.java
Normal file
@ -0,0 +1,92 @@
|
||||
package com.exquisite.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.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.exquisite.callback.AdCallback;
|
||||
import com.exquisite.fragment.AllFragment;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.Mytools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AllActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
private LinearLayout back;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_all);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.allactivity), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
AllFragment fragment = new AllFragment();
|
||||
FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
FragmentTransaction transaction = fragmentManager.beginTransaction();
|
||||
transaction.add(R.id.all_activity_fragment, fragment);
|
||||
transaction.commit();
|
||||
adsList = Mytools.getAllAd();
|
||||
intView();
|
||||
intEvent();
|
||||
}
|
||||
|
||||
private void intEvent() {
|
||||
back.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void intView() {
|
||||
back = findViewById(R.id.back);
|
||||
}
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.back) {
|
||||
showAd();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void showAd() {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
} else {
|
||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
cachedAd.showAd(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
package com.exquisite.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.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.Mytools;
|
||||
|
||||
public class KeyBoardSettingsActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
private static final InputMethodManager methodManager = (InputMethodManager) KeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
private LinearLayout back, step1, step2;
|
||||
private ImageView step1_image, step2_image;
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_key_board_settings);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.keyboard_settings), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
intView();
|
||||
intImage();
|
||||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
step1.setSelected(Mytools.isStep1());
|
||||
step2.setSelected(Mytools.isStep2());
|
||||
intImage();
|
||||
}
|
||||
};
|
||||
registerReceiver(broadcastReceiver, new IntentFilter(Intent.ACTION_INPUT_METHOD_CHANGED));
|
||||
|
||||
|
||||
intEvent();
|
||||
}
|
||||
|
||||
private void intImage() {
|
||||
if (Mytools.isStep2()){
|
||||
step2_image.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
step2_image.setVisibility(View.GONE);
|
||||
}
|
||||
if (Mytools.isStep1()){
|
||||
step1_image.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
step1_image.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void intEvent() {
|
||||
back.setOnClickListener(this);
|
||||
step2.setOnClickListener(this);
|
||||
step1.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void intView() {
|
||||
back = findViewById(R.id.settings_back);
|
||||
step1 = findViewById(R.id.step1);
|
||||
step2 = findViewById(R.id.step2);
|
||||
step1_image = findViewById(R.id.step1_image);
|
||||
step2_image = findViewById(R.id.step2_image);
|
||||
step1_image.setVisibility(View.GONE);
|
||||
step2_image.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.settings_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.step1:
|
||||
Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
|
||||
startActivity(intent);
|
||||
intImage();
|
||||
break;
|
||||
case R.id.step2:
|
||||
methodManager.showInputMethodPicker();
|
||||
intImage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
step1.setSelected(Mytools.isStep1());
|
||||
step2.setSelected(Mytools.isStep2());
|
||||
intImage();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (Mytools.isStep1()&&Mytools.isStep2()){
|
||||
Toast.makeText(KeyBoardSettingsActivity.this,getString(R.string.text_step_successful),Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(KeyBoardSettingsActivity.this,getString(R.string.text_step_failed),Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
90
app/src/main/java/com/exquisite/activity/MainActivity.java
Normal file
@ -0,0 +1,90 @@
|
||||
package com.exquisite.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.viewpager.widget.ViewPager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.exquisite.adapter.PageAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
private TabLayout tabLayout;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.mainactivity), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
tabLayout = findViewById(R.id.main_tabLayout);
|
||||
ViewPager viewPager = findViewById(R.id.main_viewpager);
|
||||
PageAdapter adapter = new PageAdapter(getSupportFragmentManager());
|
||||
viewPager.setAdapter(adapter);
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
|
||||
setmainTabIcons(tabLayout);
|
||||
viewPager.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 < tabLayout.getTabCount(); i++) {
|
||||
final TabLayout.Tab tab = tabLayout.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 == 0 ? R.drawable.setting_uncheck : R.drawable.setting_check);
|
||||
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.setting_uncheck);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
183
app/src/main/java/com/exquisite/activity/PreviewActivity.java
Normal file
@ -0,0 +1,183 @@
|
||||
package com.exquisite.activity;
|
||||
|
||||
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 androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.callback.AdCallback;
|
||||
import com.exquisite.callback.DownloadCallback;
|
||||
import com.exquisite.callback.UnzipCallback;
|
||||
import com.exquisite.data.StaticValue;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.Mytools;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class PreviewActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
private LinearLayout back, viewall, settings;
|
||||
private RecyclerView previewrv;
|
||||
private ImageView imageView;
|
||||
private String name;
|
||||
private String preview;
|
||||
private String url;
|
||||
private String unzipPath;
|
||||
private TextView textView;
|
||||
private ProgressBar progressBarPreview;
|
||||
|
||||
private ProgressBar progressBarDownload;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_preview);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.preview), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
intView();
|
||||
adsList = Mytools.getAllAd();
|
||||
imageView.setVisibility(View.GONE);
|
||||
progressBarPreview.setVisibility(View.VISIBLE);
|
||||
progressBarDownload.setVisibility(View.GONE);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
previewrv.setAdapter(new ThumAdapter(this, KeyboardSkin.getMyDataArrayList()));
|
||||
previewrv.setLayoutManager(new GridLayoutManager(this, 2));
|
||||
previewrv.addItemDecoration(spaceItem);
|
||||
Intent intent = getIntent();
|
||||
preview = intent.getStringExtra(StaticValue.KEY_PRE);
|
||||
name = intent.getStringExtra(StaticValue.KEY_NAME);
|
||||
url = intent.getStringExtra(StaticValue.KEY_URL);
|
||||
Glide.with(this)
|
||||
.asBitmap()
|
||||
.load(preview)
|
||||
.into(new CustomTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||
imageView.setImageBitmap(resource);
|
||||
imageView.setVisibility(View.VISIBLE);
|
||||
textView.setText(name);
|
||||
progressBarPreview.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
File cacheDir = this.getCacheDir();
|
||||
unzipPath = cacheDir + "/" + name;
|
||||
intEvent();
|
||||
}
|
||||
|
||||
private void intEvent() {
|
||||
back.setOnClickListener(this);
|
||||
viewall.setOnClickListener(this);
|
||||
settings.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void intView() {
|
||||
back = findViewById(R.id.detail_back);
|
||||
imageView = findViewById(R.id.preview_image);
|
||||
viewall = findViewById(R.id.preview_all);
|
||||
previewrv = findViewById(R.id.detail_rv);
|
||||
textView = findViewById(R.id.image_text);
|
||||
settings = findViewById(R.id.detail_setting);
|
||||
progressBarPreview = findViewById(R.id.image_progress);
|
||||
progressBarDownload = findViewById(R.id.download_progress);
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.detail_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.preview_all:
|
||||
Intent intent = new Intent(PreviewActivity.this, AllActivity.class);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case R.id.detail_setting:
|
||||
download();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void download() {
|
||||
if (!Mytools.isStep1() || !Mytools.isStep2()) {
|
||||
Toast.makeText(this, getString(R.string.text_hint), Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(this, KeyBoardSettingsActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
progressBarDownload.setVisibility(View.VISIBLE);
|
||||
Mytools.donwnZip(this, url, (successful, resource) -> {
|
||||
if (successful) {
|
||||
Mytools.unZip(this, unzipPath, resource, (successful1, resDirPath) -> {
|
||||
if (successful1) {
|
||||
StaticValue.PATH = resDirPath;
|
||||
Toast.makeText(PreviewActivity.this, getString(R.string.set_successful), Toast.LENGTH_SHORT).show();
|
||||
progressBarDownload.setVisibility(View.GONE);
|
||||
showAd();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void showAd() {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
|
||||
} else {
|
||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
|
||||
}
|
||||
});
|
||||
cachedAd.showAd();
|
||||
}
|
||||
}
|
||||
}
|
||||
128
app/src/main/java/com/exquisite/activity/SearchActivity.java
Normal file
@ -0,0 +1,128 @@
|
||||
package com.exquisite.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 androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.data.Mydata;
|
||||
import com.exquisite.data.StaticValue;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SearchActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
private ImageView back;
|
||||
private EditText searchText;
|
||||
private RecyclerView searchrv;
|
||||
private String name;
|
||||
private String searchname;
|
||||
private TextView search, faile;
|
||||
|
||||
private final SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.search_activity), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
initView();
|
||||
faile.setVisibility(View.GONE);
|
||||
searchText.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||
searchText.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
search();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
searchrv.addItemDecoration(spaceItem);
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
back.setOnClickListener(this);
|
||||
search.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
back = findViewById(R.id.search_back);
|
||||
searchrv = findViewById(R.id.searc_rv);
|
||||
searchText = findViewById(R.id.edit_search);
|
||||
search = findViewById(R.id.cancel);
|
||||
faile = findViewById(R.id.faile);
|
||||
}
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.search_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.cancel:
|
||||
search();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void search() {
|
||||
if (TextUtils.isEmpty(searchText.getText().toString())) {
|
||||
faile.setVisibility(View.VISIBLE);
|
||||
searchrv.setVisibility(View.GONE);
|
||||
faile.setText(R.string.text_tips);
|
||||
} else {
|
||||
faile.setVisibility(View.GONE);
|
||||
searchrv.setVisibility(View.VISIBLE);
|
||||
Mydata mydata = new Mydata();
|
||||
searchname = searchText.getText().toString();
|
||||
List<Mydata> filteredData = mydata.filterByName(searchname, KeyboardSkin.getMyDataArrayList());
|
||||
if (filteredData.isEmpty()) {
|
||||
faile.setVisibility(View.VISIBLE);
|
||||
faile.setText(R.string.text_null);
|
||||
searchrv.setVisibility(View.GONE);
|
||||
} else {
|
||||
faile.setVisibility(View.GONE);
|
||||
searchrv.setVisibility(View.VISIBLE);
|
||||
searchrv.setAdapter(new ThumAdapter(this, filteredData));
|
||||
searchrv.setLayoutManager(new GridLayoutManager(this, 2));
|
||||
}
|
||||
}
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(searchText.getWindowToken(), 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
129
app/src/main/java/com/exquisite/activity/SplashActivity.java
Normal file
@ -0,0 +1,129 @@
|
||||
package com.exquisite.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.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.callback.AdCallback;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.Mytools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
private CountDownTimer countDownTimer;
|
||||
private boolean needShow = true;
|
||||
private boolean key = true;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash);
|
||||
EdgeToEdge.enable(this);
|
||||
View splashView = findViewById(R.id.splashactivity);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(splashView, (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
initializeCountDownTimer();
|
||||
loadAndStartAd();
|
||||
}
|
||||
|
||||
private void initializeCountDownTimer() {
|
||||
countDownTimer = new CountDownTimer(11000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
if (!key) {
|
||||
showAdOrStartView();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (key) {
|
||||
showAdOrStartView();
|
||||
}
|
||||
startView();
|
||||
}
|
||||
};
|
||||
registerBroadcastReceiver();
|
||||
}
|
||||
|
||||
private void showAdOrStartView() {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
key = false;
|
||||
startView();
|
||||
} else {
|
||||
key = true;
|
||||
needShow = false;
|
||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
startView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
startView();
|
||||
|
||||
}
|
||||
});
|
||||
cachedAd.showAd();
|
||||
}
|
||||
}
|
||||
|
||||
private void startView() {
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
private void loadAndStartAd() {
|
||||
adsList = Mytools.getAllAd();
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void registerBroadcastReceiver() {
|
||||
if (!KeyboardSkin.initSDK) {
|
||||
BroadcastReceiver receiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
loadAndStartAd();
|
||||
}
|
||||
};
|
||||
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(receiver, new IntentFilter(KeyboardSkin.AD_BROADCAST));
|
||||
} else {
|
||||
loadAndStartAd();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
app/src/main/java/com/exquisite/adapter/PageAdapter.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.exquisite.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
|
||||
import com.exquisite.fragment.PageOneFragment;
|
||||
import com.exquisite.fragment.PageTwoFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageAdapter extends FragmentPagerAdapter {
|
||||
private final List<Fragment> list = new ArrayList<>();
|
||||
|
||||
public PageAdapter(@NonNull FragmentManager fm) {
|
||||
super(fm);
|
||||
list.add(new PageOneFragment());
|
||||
list.add(new PageTwoFragment());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return list.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
63
app/src/main/java/com/exquisite/adapter/ThumAdapter.java
Normal file
@ -0,0 +1,63 @@
|
||||
package com.exquisite.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.exquisite.activity.PreviewActivity;
|
||||
import com.exquisite.data.Mydata;
|
||||
import com.exquisite.data.StaticValue;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.Mytools;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ThumAdapter extends RecyclerView.Adapter<ThumVH> {
|
||||
private Context myContext;
|
||||
private List<Mydata> myDataList;
|
||||
|
||||
public ThumAdapter(Context context, List<Mydata> 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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ThumVH holder, int position) {
|
||||
Mydata myData = myDataList.get(position);
|
||||
String thumbnail = myData.getThumbnail();
|
||||
Glide.with(myContext)
|
||||
.load(thumbnail)
|
||||
.placeholder(R.mipmap.logo)
|
||||
.transform(new RoundedCorners(Mytools.dp2Px(12)))
|
||||
.into(holder.getImageViewThumb());
|
||||
holder.getConstraintLayout().setOnClickListener(v -> {
|
||||
Intent intent = new Intent(myContext, PreviewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_NAME, myData.getResourceName());
|
||||
intent.putExtra(StaticValue.KEY_URL, myData.getUrl());
|
||||
intent.putExtra(StaticValue.KEY_PRE, myData.getPreview());
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
myContext.startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return myDataList.size();
|
||||
}
|
||||
}
|
||||
29
app/src/main/java/com/exquisite/adapter/ThumVH.java
Normal file
@ -0,0 +1,29 @@
|
||||
package com.exquisite.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.demo08.R;
|
||||
|
||||
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 ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
}
|
||||
8
app/src/main/java/com/exquisite/callback/AdCallback.java
Normal file
@ -0,0 +1,8 @@
|
||||
package com.exquisite.callback;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
|
||||
public interface AdCallback {
|
||||
void onShowFail(MaxAd ad);
|
||||
void onAdHidden( );
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.exquisite.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.exquisite.callback;
|
||||
|
||||
public interface UnzipCallback {
|
||||
|
||||
void onUnzipCall(boolean successful, String resDirPath);
|
||||
}
|
||||
55
app/src/main/java/com/exquisite/data/Mydata.java
Normal file
@ -0,0 +1,55 @@
|
||||
package com.exquisite.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Mydata {
|
||||
private String resourceName;
|
||||
|
||||
private String thumbnail;
|
||||
private String preview;
|
||||
|
||||
private String url;
|
||||
|
||||
public void setPreview(String preview) {
|
||||
this.preview = preview;
|
||||
}
|
||||
|
||||
public void setResourceName(String resourceName) {
|
||||
this.resourceName = resourceName;
|
||||
}
|
||||
|
||||
public void setThumbnail(String thumbnail) {
|
||||
this.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getPreview() {
|
||||
return preview;
|
||||
}
|
||||
|
||||
public String getResourceName() {
|
||||
return resourceName;
|
||||
}
|
||||
|
||||
public String getThumbnail() {
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public List<Mydata> filterByName(String input, List<Mydata> dataList) {
|
||||
List<Mydata> filteredList = new ArrayList<>();
|
||||
for (Mydata data : dataList) {
|
||||
if (data.getResourceName().toLowerCase().contains(input.toLowerCase())) {
|
||||
filteredList.add(data);
|
||||
}
|
||||
}
|
||||
return filteredList;
|
||||
}
|
||||
}
|
||||
8
app/src/main/java/com/exquisite/data/StaticValue.java
Normal file
@ -0,0 +1,8 @@
|
||||
package com.exquisite.data;
|
||||
|
||||
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 = "";
|
||||
}
|
||||
117
app/src/main/java/com/exquisite/fragment/AllFragment.java
Normal file
@ -0,0 +1,117 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.exquisite.demo08.R;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AllFragment extends Fragment {
|
||||
private ViewPager viewPager;
|
||||
private TabLayout tabLayout;
|
||||
private MyPagerAdapter adapter;
|
||||
private TextView tabtext;
|
||||
private List<Fragment> list = new ArrayList<>();
|
||||
|
||||
private String[] listtext = {"For You", "Love", "Cool", "Cute", "Neon", "Aesthetic"};
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_all, container, false);
|
||||
|
||||
tabLayout = view.findViewById(R.id.all_tabLayout);
|
||||
viewPager = view.findViewById(R.id.all_viewpager);
|
||||
|
||||
|
||||
list.add(new FragmentForyou());
|
||||
list.add(new FragmentLove());
|
||||
list.add(new FragmentCool());
|
||||
list.add(new FragmentCute());
|
||||
list.add(new FragmentNeon());
|
||||
list.add(new FragmentAesthetic());
|
||||
|
||||
adapter = new MyPagerAdapter(getChildFragmentManager(), list);
|
||||
viewPager.setAdapter(adapter);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
TabLayout.Tab tab4k = tabLayout.newTab();
|
||||
tabLayout.addTab(tab4k);
|
||||
View customView = LayoutInflater.from(requireContext()).inflate(R.layout.custom_tablayout, null);
|
||||
tabtext = customView.findViewById(R.id.tab_text);
|
||||
tabtext.setText(listtext[i]);
|
||||
tabtext.setBackgroundResource(android.R.color.transparent);
|
||||
tab4k.setCustomView(customView);
|
||||
final int finalI = i;
|
||||
tab4k.view.setOnClickListener(v -> {
|
||||
viewPager.setCurrentItem(finalI);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
viewPager.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) {
|
||||
}
|
||||
});
|
||||
return view;
|
||||
|
||||
}
|
||||
|
||||
private void setTabIcons(int position) {
|
||||
for (int i = 0; i < tabLayout.getTabCount(); i++) {
|
||||
TabLayout.Tab tab = tabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
tab.getCustomView().findViewById(R.id.tab_text).setSelected(i == position);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class MyPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private final List<Fragment> fragmentList;
|
||||
|
||||
public MyPagerAdapter(@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,33 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
public class FragmentAesthetic extends Fragment {
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
33
app/src/main/java/com/exquisite/fragment/FragmentCool.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
public class FragmentCool extends Fragment {
|
||||
|
||||
private RecyclerView recyclerView;
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(),2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
36
app/src/main/java/com/exquisite/fragment/FragmentCute.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
|
||||
public class FragmentCute extends Fragment {
|
||||
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(),2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
33
app/src/main/java/com/exquisite/fragment/FragmentForyou.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
public class FragmentForyou extends Fragment {
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
34
app/src/main/java/com/exquisite/fragment/FragmentLove.java
Normal file
@ -0,0 +1,34 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
public class FragmentLove extends Fragment {
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
35
app/src/main/java/com/exquisite/fragment/FragmentNeon.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
|
||||
public class FragmentNeon extends Fragment {
|
||||
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_foryou, container, false);
|
||||
|
||||
recyclerView = view.findViewById(R.id.keyboard_rv);
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
recyclerView.addItemDecoration(spaceItem);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.activity.AllActivity;
|
||||
import com.exquisite.activity.SearchActivity;
|
||||
import com.exquisite.adapter.ThumAdapter;
|
||||
import com.exquisite.demo08.R;
|
||||
import com.exquisite.tools.SpaceItem;
|
||||
|
||||
|
||||
public class PageOneFragment extends Fragment {
|
||||
private RecyclerView mainrv;
|
||||
private LinearLayout viewall;
|
||||
private ImageView seach;
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_page_one, container, false);
|
||||
viewall = view.findViewById(R.id.view_all);
|
||||
seach = view.findViewById(R.id.search_image);
|
||||
mainrv = view.findViewById(R.id.main_keyboard_rv);
|
||||
viewall.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(getActivity(), AllActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
seach.setOnClickListener(v -> {
|
||||
Intent intent1 = new Intent(getActivity(), SearchActivity.class);
|
||||
startActivity(intent1);
|
||||
});
|
||||
SpaceItem spaceItem = new SpaceItem(10, 20, 10);
|
||||
mainrv.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
|
||||
mainrv.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||
mainrv.addItemDecoration(spaceItem);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.exquisite.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.exquisite.activity.KeyBoardSettingsActivity;
|
||||
import com.exquisite.demo08.R;
|
||||
|
||||
public class PageTwoFragment extends Fragment implements View.OnClickListener {
|
||||
private LinearLayout settings, rate, privacy;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_page_two, container, false);
|
||||
settings = view.findViewById(R.id.keyboard_setting);
|
||||
rate = view.findViewById(R.id.rate_us);
|
||||
privacy = view.findViewById(R.id.privacy);
|
||||
initEvent();
|
||||
return view;
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
settings.setOnClickListener(this);
|
||||
rate.setOnClickListener(this);
|
||||
privacy.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.keyboard_setting:
|
||||
Intent intent1 = new Intent(getActivity(), KeyBoardSettingsActivity.class);
|
||||
startActivity(intent1);
|
||||
break;
|
||||
case R.id.rate_us:
|
||||
break;
|
||||
case R.id.privacy:
|
||||
String url = getString(R.string.url_privacy);
|
||||
Intent intent2 = new Intent(Intent.ACTION_VIEW);
|
||||
intent2.setData(Uri.parse(url));
|
||||
startActivity(intent2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
133
app/src/main/java/com/exquisite/keyboard/KeyboardService.java
Normal file
@ -0,0 +1,133 @@
|
||||
package com.exquisite.keyboard;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.inputmethodservice.KeyboardView;
|
||||
import android.os.IBinder;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import com.exquisite.demo08.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.getShiiftType() == 0) {
|
||||
changeView(3);
|
||||
myKeyboard.setShiiftType(1);
|
||||
} else {
|
||||
changeView(0);
|
||||
myKeyboard.setShiiftType(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.getShiiftType() == 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.setShiiftType(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() {
|
||||
|
||||
}
|
||||
}
|
||||
146
app/src/main/java/com/exquisite/keyboard/MyKeyboard.java
Normal file
@ -0,0 +1,146 @@
|
||||
package com.exquisite.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 android.util.Log;
|
||||
|
||||
import com.exquisite.tools.CustomViewConfig;
|
||||
import com.exquisite.tools.Mytools;
|
||||
import com.exquisite.tools.drawIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MyKeyboard extends KeyboardView {
|
||||
private Paint mPaint;
|
||||
private int viewType = 0;
|
||||
private int shiiftType = 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 getShiiftType() {
|
||||
return shiiftType;
|
||||
}
|
||||
|
||||
public void setShiiftType(int shiiftType) {
|
||||
this.shiiftType = shiiftType;
|
||||
}
|
||||
|
||||
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 (shiiftType == 0) {
|
||||
|
||||
return config.getIconShift();
|
||||
} else {
|
||||
return config.getIconShiftLock();
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
config = new CustomViewConfig();
|
||||
mPaint = new Paint();
|
||||
config.init();
|
||||
float texsize = Mytools.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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
182
app/src/main/java/com/exquisite/tools/CustomViewConfig.java
Normal file
@ -0,0 +1,182 @@
|
||||
package com.exquisite.tools;
|
||||
|
||||
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.Log;
|
||||
import android.util.Xml;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.exquisite.KeyboardSkin;
|
||||
import com.exquisite.data.StaticValue;
|
||||
import com.exquisite.demo08.R;
|
||||
|
||||
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(KeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
private Drawable iconDel = ContextCompat.getDrawable(KeyboardSkin.app, R.drawable.del_icon);
|
||||
private Drawable BG = ContextCompat.getDrawable(KeyboardSkin.app, R.color.background);
|
||||
|
||||
private int keyNoramlcolor = KeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
|
||||
private int keyActioncolor = KeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
|
||||
private Drawable iconShiftLock = ContextCompat.getDrawable(KeyboardSkin.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(KeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
iconDel = ContextCompat.getDrawable(KeyboardSkin.app, R.drawable.del_icon);
|
||||
BG = ContextCompat.getDrawable(KeyboardSkin.app, R.color.white);
|
||||
keyNoramlcolor = KeyboardSkin.app.getResources().getColor(R.color.white, null);
|
||||
iconShiftLock = ContextCompat.getDrawable(KeyboardSkin.app, R.drawable.ico_shift_lit);
|
||||
Drawable drawable1 = ContextCompat.getDrawable(KeyboardSkin.app, R.drawable.de_keybg_press);
|
||||
Drawable drawable = ContextCompat.getDrawable(KeyboardSkin.app, R.drawable.de_keybg);
|
||||
StateListDrawable status = Mytools.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 = Mytools.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);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
297
app/src/main/java/com/exquisite/tools/Mytools.java
Normal file
@ -0,0 +1,297 @@
|
||||
package com.exquisite.tools;
|
||||
|
||||
import static android.provider.Settings.System.getString;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
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.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
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.exquisite.KeyboardSkin;
|
||||
import com.exquisite.callback.AdCallback;
|
||||
import com.exquisite.callback.DownloadCallback;
|
||||
import com.exquisite.callback.UnzipCallback;
|
||||
import com.exquisite.data.Mydata;
|
||||
import com.exquisite.demo08.R;
|
||||
|
||||
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;
|
||||
|
||||
public class Mytools {
|
||||
private static InputMethodManager methodManager = (InputMethodManager) KeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
private static ArrayList<MaxInterstitialAd> adArrayList;
|
||||
private static final String one_AD = "37dcb994d4988394";
|
||||
private static final String two_Ad = "a77c5657a94cbb64";
|
||||
private static final String three_ad = "b3a3acdefa7117ff";
|
||||
|
||||
public static void setADCAllBack(MaxInterstitialAd ad, AdCallback adCallback) {
|
||||
ad.setListener(new MaxAdListener() {
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
adCallback.onAdHidden();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
adCallback.onShowFail(maxAd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static MaxInterstitialAd onCache(List<MaxInterstitialAd> list) {
|
||||
Collections.shuffle(list);
|
||||
for (MaxInterstitialAd ad : list) {
|
||||
if (ad.isReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> getAllAd() {
|
||||
if (adArrayList == null) {
|
||||
adArrayList = new ArrayList<>();
|
||||
adArrayList.add(createAd(one_AD, KeyboardSkin.app));
|
||||
adArrayList.add(createAd(two_Ad, KeyboardSkin.app));
|
||||
adArrayList.add(createAd(three_ad, KeyboardSkin.app));
|
||||
}
|
||||
for (MaxInterstitialAd ad : adArrayList) {
|
||||
if (!ad.isReady()) {
|
||||
ad.loadAd();
|
||||
}
|
||||
}
|
||||
return adArrayList;
|
||||
}
|
||||
|
||||
private static MaxInterstitialAd createAd(String adUnitId, Context context) {
|
||||
MaxInterstitialAd ad = new MaxInterstitialAd(adUnitId, context);
|
||||
ad.loadAd();
|
||||
return ad;
|
||||
}
|
||||
|
||||
|
||||
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(KeyboardSkin.app.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||
return string.startsWith(KeyboardSkin.app.getPackageName());
|
||||
}
|
||||
|
||||
public static boolean isStep1() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
return methodManager.getEnabledInputMethodList().stream()
|
||||
.anyMatch(inputMethodInfo -> inputMethodInfo.getId().startsWith(KeyboardSkin.app.getPackageName()));
|
||||
} else {
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) KeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
List<InputMethodInfo> inputMethodList = inputMethodManager.getEnabledInputMethodList();
|
||||
if (inputMethodList != null) {
|
||||
for (InputMethodInfo inputMethodInfo : inputMethodList) {
|
||||
if (inputMethodInfo.getId().startsWith(KeyboardSkin.app.getPackageName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static int dp2Px(int dp) {
|
||||
float scale = KeyboardSkin.getAppContext().getResources().getDisplayMetrics().density;
|
||||
return (int) (dp * scale + 0.5f);
|
||||
}
|
||||
|
||||
private static JSONArray loadJSONFromAsset(String filename) {
|
||||
String json;
|
||||
try {
|
||||
AssetManager assetManager = KeyboardSkin.getAppContext().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);
|
||||
JSONArray classArray = list.getJSONArray("list");
|
||||
for (int i = 0; i < classArray.length(); i++) {
|
||||
JSONObject item = classArray.getJSONObject(i);
|
||||
Mydata myData = new Mydata();
|
||||
myData.setPreview(item.getString("preview"));
|
||||
myData.setThumbnail(item.getString("thumb"));
|
||||
myData.setResourceName(item.getString("title"));
|
||||
myData.setUrl(item.getString("zipUrl"));
|
||||
dataList.add(myData);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
56
app/src/main/java/com/exquisite/tools/SpaceItem.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.exquisite.tools;
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
47
app/src/main/java/com/exquisite/tools/drawIcon.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.exquisite.tools;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
|
||||
import com.exquisite.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);
|
||||
}
|
||||
}
|
||||
17
app/src/main/res/drawable/butoon_tablayout.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#244CDB" />
|
||||
<corners
|
||||
android:bottomLeftRadius="27dp"
|
||||
android:bottomRightRadius="27dp"
|
||||
android:topLeftRadius="27dp"
|
||||
android:topRightRadius="27dp" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:endColor="#5424DB"
|
||||
android:startColor="#244CDB"
|
||||
android:type="linear" />
|
||||
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable/de_keybg.9.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
app/src/main/res/drawable/de_keybg_press.9.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
9
app/src/main/res/drawable/del_icon.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>
|
||||
11
app/src/main/res/drawable/drw_tab_bg.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="32dp" />
|
||||
<gradient
|
||||
|
||||
android:endColor="#00244CDB"
|
||||
android:startColor="#5424DB"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/home_check.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M12.996,21H11.005C7.903,21 6.352,21 5.295,20.089C4.237,19.178 4.018,17.655 3.579,14.606L3.328,12.862C2.986,10.489 2.815,9.302 3.302,8.288C3.788,7.273 4.824,6.656 6.895,5.423L8.141,4.68C10.02,3.56 10.962,3 12,3C13.039,3 13.979,3.56 15.859,4.68L17.106,5.423C19.176,6.656 20.212,7.273 20.699,8.288C21.185,9.302 21.014,10.489 20.672,12.862L20.421,14.606C19.983,17.655 19.764,19.178 18.706,20.089C17.649,21 16.098,21 12.996,21ZM8.759,15.198C8.865,15.054 9.025,14.958 9.202,14.932C9.379,14.906 9.559,14.951 9.703,15.057C10.358,15.543 11.149,15.825 12,15.825C12.852,15.825 13.643,15.543 14.298,15.057C14.369,15.005 14.45,14.966 14.536,14.945C14.622,14.923 14.712,14.919 14.799,14.932C14.887,14.945 14.971,14.975 15.047,15.02C15.123,15.066 15.19,15.126 15.243,15.197C15.295,15.269 15.334,15.349 15.355,15.435C15.377,15.521 15.381,15.611 15.368,15.698C15.355,15.786 15.325,15.87 15.28,15.947C15.234,16.023 15.174,16.089 15.103,16.142C14.207,16.812 13.119,17.174 12,17.175C10.882,17.174 9.794,16.812 8.898,16.142C8.754,16.035 8.659,15.876 8.633,15.699C8.607,15.522 8.652,15.341 8.759,15.198Z" />
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/home_uncheck.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:fillColor="#00000000"
|
||||
android:pathData="M1.81,10.814C1.487,8.573 1.325,7.452 1.785,6.494C2.244,5.536 3.222,4.953 5.178,3.788L6.355,3.087C8.13,2.029 9.019,1.5 10,1.5C10.981,1.5 11.869,2.029 13.645,3.087L14.822,3.788C16.777,4.953 17.755,5.536 18.215,6.494C18.674,7.452 18.513,8.573 18.19,10.814L17.953,12.461C17.539,15.34 17.332,16.779 16.333,17.64C15.334,18.5 13.87,18.5 10.94,18.5H9.06C6.13,18.5 4.665,18.5 3.667,17.64C2.668,16.779 2.461,15.34 2.047,12.461L1.81,10.814Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeColor="#ffffff" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M7.45,13.4C8.172,13.935 9.052,14.25 10,14.25C10.948,14.25 11.827,13.935 12.55,13.4"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeColor="#ffffff"
|
||||
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>
|
||||
10
app/src/main/res/drawable/icon.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="18dp"
|
||||
android:viewportWidth="18"
|
||||
android:viewportHeight="18">
|
||||
<path
|
||||
android:fillColor="#CCCCCC"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M6.595,3.97C6.302,4.263 6.302,4.737 6.595,5.03L10.564,9L6.595,12.97C6.302,13.263 6.302,13.737 6.595,14.03C6.888,14.323 7.362,14.323 7.655,14.03L12.155,9.53C12.448,9.237 12.448,8.763 12.155,8.47L7.655,3.97C7.362,3.677 6.888,3.677 6.595,3.97Z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/icon_back.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M15.207,5.293C15.598,5.684 15.598,6.317 15.207,6.707L9.914,12L15.207,17.293C15.598,17.684 15.598,18.317 15.207,18.707C14.817,19.098 14.183,19.098 13.793,18.707L7.793,12.707C7.402,12.317 7.402,11.684 7.793,11.293L13.793,5.293C14.183,4.902 14.817,4.902 15.207,5.293Z" />
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/icon_check.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#666666"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M11.932,20C16.423,20 20,16.388 20,12.068C20,7.594 16.406,4 11.932,4C7.612,4 4,7.577 4,12.068C4,16.406 7.594,20 11.932,20ZM22,12.068C22,17.51 17.51,22 11.932,22C6.49,22 2,17.51 2,12.068C2,6.49 6.49,2 11.932,2C17.51,2 22,6.49 22,12.068Z" />
|
||||
<path
|
||||
android:fillColor="#666666"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M17.492,8.884C17.654,9.047 17.654,9.31 17.492,9.473L10.654,16.311C10.491,16.474 10.227,16.474 10.065,16.311L6.445,12.691C6.282,12.528 6.282,12.264 6.445,12.102L7.034,11.512C7.197,11.35 7.46,11.35 7.623,11.512L10.065,13.954C10.227,14.117 10.491,14.117 10.654,13.954L16.313,8.295C16.476,8.132 16.74,8.132 16.902,8.295L17.492,8.884Z" />
|
||||
</vector>
|
||||
41
app/src/main/res/drawable/icon_down.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M6.339,10.135C4.137,10.659 2.5,12.638 2.5,15C2.5,17.761 4.738,20 7.5,20C7.974,20 8.432,19.934 8.866,19.811"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M18.527,10.135C20.729,10.659 22.366,12.638 22.366,15C22.366,17.761 20.128,20 17.366,20C16.892,20 16.434,19.934 16,19.811"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M18.5,10C18.5,6.686 15.814,4 12.5,4C9.186,4 6.5,6.686 6.5,10"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9.033,15.059L12.5,18.538L16.066,15"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12.5,10V16.769"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
13
app/src/main/res/drawable/keyboard.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M6.45,10.15V10.159M10.15,10.15V10.159M13.85,10.15V10.159M17.55,10.15V10.159M6.45,13.85V13.859M17.55,13.85V13.859M10.15,13.85L13.85,13.859M2.75,8.3C2.75,7.809 2.945,7.339 3.292,6.992C3.639,6.645 4.109,6.45 4.6,6.45H19.4C19.891,6.45 20.361,6.645 20.708,6.992C21.055,7.339 21.25,7.809 21.25,8.3V15.7C21.25,16.191 21.055,16.661 20.708,17.008C20.361,17.355 19.891,17.55 19.4,17.55H4.6C4.109,17.55 3.639,17.355 3.292,17.008C2.945,16.661 2.75,16.191 2.75,15.7V8.3Z"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
||||
27
app/src/main/res/drawable/privacy.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M10.616,3.044L6.042,4.768C4.987,5.162 4.126,6.408 4.126,7.527V14.338C4.126,15.419 4.841,16.84 5.712,17.491L9.653,20.433C10.946,21.405 13.072,21.405 14.365,20.433L18.307,17.491C19.177,16.84 19.892,15.419 19.892,14.338V7.527C19.892,6.399 19.031,5.153 17.977,4.758L13.402,3.044C12.623,2.76 11.377,2.76 10.616,3.044Z"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M12,12.458C13.013,12.458 13.833,11.637 13.833,10.625C13.833,9.613 13.013,8.792 12,8.792C10.988,8.792 10.167,9.613 10.167,10.625C10.167,11.637 10.988,12.458 12,12.458Z"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M12,12.458V15.208"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/rateus.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:fillColor="#00000000"
|
||||
android:pathData="M9,10H9.01M15,10H15.01M3,12C3,13.182 3.233,14.352 3.685,15.444C4.137,16.536 4.8,17.528 5.636,18.364C6.472,19.2 7.464,19.863 8.556,20.315C9.648,20.767 10.818,21 12,21C13.182,21 14.352,20.767 15.444,20.315C16.536,19.863 17.528,19.2 18.364,18.364C19.2,17.528 19.863,16.536 20.315,15.444C20.767,14.352 21,13.182 21,12C21,10.818 20.767,9.648 20.315,8.556C19.863,7.464 19.2,6.472 18.364,5.636C17.528,4.8 16.536,4.137 15.444,3.685C14.352,3.233 13.182,3 12,3C10.818,3 9.648,3.233 8.556,3.685C7.464,4.137 6.472,4.8 5.636,5.636C4.8,6.472 4.137,7.464 3.685,8.556C3.233,9.648 3,10.818 3,12Z"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9.5,15C9.826,15.333 10.215,15.597 10.644,15.777C11.073,15.958 11.534,16.051 12,16.051C12.466,16.051 12.927,15.958 13.356,15.777C13.785,15.597 14.174,15.333 14.5,15"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/search.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M448,234.7c-51.2,0 -100.3,19.2 -136.5,55.5 -8.5,8.5 -8.5,21.3 0,29.9 4.3,4.3 10.7,6.4 14.9,6.4s10.7,-2.1 14.9,-6.4c27.7,-27.7 66.1,-44.8 104.5,-44.8s76.8,14.9 106.7,44.8c8.5,8.5 21.3,8.5 29.9,0s8.5,-21.3 0,-29.9C548.3,253.9 499.2,234.7 448,234.7z"
|
||||
android:fillColor="#C8BAA2"/>
|
||||
<path
|
||||
android:pathData="M904.5,874.7l-170.7,-170.7c61.9,-68.3 98.1,-157.9 98.1,-256 0,-211.2 -172.8,-384 -384,-384S64,236.8 64,448s172.8,384 384,384c98.1,0 187.7,-38.4 256,-98.1l170.7,170.7c4.3,4.3 10.7,6.4 14.9,6.4s10.7,-2.1 14.9,-6.4c8.5,-8.5 8.5,-21.3 0,-29.9zM106.7,448c0,-187.7 153.6,-341.3 341.3,-341.3s341.3,153.6 341.3,341.3 -153.6,341.3 -341.3,341.3S106.7,635.7 106.7,448z"
|
||||
android:fillColor="#C8BAA2"/>
|
||||
</vector>
|
||||
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">
|
||||
<stroke android:width="1dp" android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="80dp"
|
||||
android:bottomRightRadius="80dp"
|
||||
android:topLeftRadius="80dp"
|
||||
android:topRightRadius="80dp" />
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/setting_check.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h24v24h-24z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M13.685,3.137C13.335,3 12.89,3 12,3C11.111,3 10.665,3 10.315,3.137C9.848,3.319 9.477,3.669 9.282,4.111C9.193,4.312 9.159,4.547 9.145,4.888C9.138,5.135 9.066,5.377 8.934,5.59C8.802,5.803 8.615,5.981 8.391,6.106C8.162,6.227 7.905,6.291 7.644,6.292C7.382,6.293 7.125,6.232 6.895,6.113C6.575,5.953 6.343,5.865 6.113,5.836C5.612,5.773 5.104,5.901 4.702,6.192C4.4,6.41 4.178,6.774 3.734,7.5C3.288,8.226 3.067,8.589 3.016,8.944C2.95,9.418 3.087,9.897 3.395,10.276C3.536,10.448 3.734,10.593 4.04,10.775C4.491,11.042 4.781,11.498 4.781,12C4.781,12.502 4.491,12.958 4.04,13.224C3.734,13.407 3.536,13.552 3.394,13.724C3.242,13.911 3.13,14.125 3.065,14.354C3,14.583 2.984,14.821 3.016,15.056C3.067,15.41 3.288,15.774 3.734,16.5C4.179,17.226 4.4,17.589 4.702,17.808C5.103,18.098 5.611,18.226 6.113,18.164C6.343,18.135 6.575,18.047 6.895,17.887C7.125,17.768 7.383,17.707 7.644,17.708C7.906,17.709 8.163,17.773 8.392,17.894C8.852,18.146 9.125,18.61 9.145,19.112C9.159,19.454 9.193,19.688 9.282,19.889C9.475,20.33 9.847,20.681 10.315,20.863C10.665,21 11.111,21 12,21C12.89,21 13.335,21 13.685,20.863C14.152,20.681 14.523,20.331 14.718,19.889C14.807,19.688 14.841,19.454 14.855,19.112C14.874,18.61 15.148,18.145 15.609,17.894C15.838,17.773 16.095,17.709 16.356,17.708C16.618,17.707 16.875,17.768 17.105,17.887C17.426,18.047 17.658,18.135 17.887,18.164C18.389,18.227 18.897,18.098 19.298,17.808C19.6,17.59 19.822,17.226 20.267,16.5C20.712,15.774 20.934,15.411 20.984,15.056C21.016,14.821 21,14.582 20.934,14.354C20.869,14.125 20.757,13.911 20.605,13.724C20.465,13.552 20.267,13.407 19.961,13.225C19.509,12.958 19.219,12.502 19.219,12C19.219,11.498 19.509,11.042 19.96,10.776C20.267,10.593 20.465,10.448 20.606,10.276C20.758,10.089 20.87,9.874 20.935,9.646C21,9.418 21.016,9.179 20.984,8.944C20.934,8.59 20.712,8.226 20.267,7.5C19.821,6.774 19.6,6.411 19.298,6.192C18.896,5.901 18.388,5.773 17.887,5.836C17.658,5.865 17.426,5.953 17.105,6.113C16.875,6.232 16.618,6.293 16.356,6.292C16.094,6.291 15.837,6.227 15.608,6.106C15.384,5.98 15.198,5.803 15.066,5.59C14.934,5.377 14.862,5.135 14.855,4.888C14.841,4.546 14.807,4.312 14.718,4.111C14.622,3.893 14.481,3.694 14.304,3.527C14.127,3.359 13.916,3.227 13.685,3.137ZM12,14.7C13.582,14.7 14.864,13.491 14.864,12C14.864,10.509 13.581,9.3 12,9.3C10.418,9.3 9.136,10.509 9.136,12C9.136,13.491 10.419,14.7 12,14.7Z" />
|
||||
</group>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/setting_uncheck.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">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h24v24h-24z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M13.592,3.629C13.261,3.5 12.84,3.5 12,3.5C11.16,3.5 10.739,3.5 10.408,3.629C9.968,3.801 9.617,4.132 9.433,4.55C9.349,4.739 9.317,4.961 9.303,5.283C9.297,5.517 9.229,5.745 9.104,5.946C8.98,6.147 8.803,6.315 8.591,6.433C8.375,6.547 8.133,6.608 7.886,6.609C7.639,6.61 7.396,6.552 7.178,6.44C6.876,6.289 6.657,6.206 6.44,6.178C5.967,6.119 5.488,6.24 5.107,6.515C4.823,6.721 4.612,7.064 4.193,7.75C3.772,8.436 3.563,8.778 3.515,9.114C3.453,9.561 3.582,10.014 3.873,10.371C4.006,10.535 4.193,10.672 4.482,10.843C4.909,11.096 5.182,11.526 5.182,12C5.182,12.474 4.909,12.904 4.483,13.156C4.193,13.328 4.006,13.465 3.872,13.629C3.729,13.805 3.623,14.007 3.562,14.223C3.5,14.439 3.485,14.664 3.515,14.886C3.563,15.221 3.772,15.564 4.193,16.25C4.613,16.936 4.823,17.278 5.107,17.485C5.487,17.76 5.966,17.88 6.44,17.822C6.657,17.795 6.876,17.711 7.178,17.56C7.396,17.448 7.639,17.39 7.886,17.391C8.133,17.392 8.376,17.452 8.592,17.567C9.027,17.805 9.285,18.242 9.303,18.717C9.317,19.04 9.349,19.261 9.433,19.45C9.616,19.867 9.966,20.198 10.408,20.371C10.739,20.5 11.16,20.5 12,20.5C12.84,20.5 13.261,20.5 13.592,20.371C14.032,20.199 14.383,19.868 14.567,19.45C14.651,19.261 14.683,19.04 14.697,18.717C14.715,18.242 14.973,17.804 15.409,17.567C15.625,17.453 15.867,17.392 16.114,17.391C16.361,17.39 16.605,17.448 16.822,17.56C17.124,17.711 17.343,17.795 17.56,17.822C18.034,17.881 18.514,17.76 18.893,17.485C19.177,17.279 19.388,16.936 19.807,16.25C20.228,15.564 20.437,15.222 20.485,14.886C20.515,14.664 20.5,14.439 20.438,14.223C20.377,14.007 20.271,13.805 20.127,13.629C19.994,13.465 19.807,13.329 19.518,13.157C19.091,12.904 18.818,12.474 18.818,12C18.818,11.526 19.091,11.096 19.517,10.844C19.807,10.672 19.994,10.535 20.128,10.371C20.272,10.195 20.377,9.993 20.438,9.777C20.5,9.561 20.515,9.336 20.485,9.114C20.437,8.779 20.228,8.436 19.807,7.75C19.387,7.064 19.177,6.721 18.893,6.515C18.513,6.24 18.034,6.119 17.56,6.178C17.343,6.206 17.124,6.289 16.822,6.44C16.604,6.552 16.361,6.61 16.114,6.609C15.867,6.608 15.624,6.547 15.408,6.433C15.196,6.315 15.02,6.147 14.895,5.946C14.771,5.745 14.703,5.517 14.697,5.283C14.683,4.96 14.651,4.739 14.567,4.55C14.476,4.343 14.343,4.155 14.176,3.997C14.008,3.839 13.81,3.714 13.592,3.629ZM12,14.55C13.494,14.55 14.705,13.408 14.705,12C14.705,10.592 13.493,9.45 12,9.45C10.506,9.45 9.295,10.592 9.295,12C9.295,13.408 10.507,14.55 12,14.55Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeColor="#ffffff" />
|
||||
</group>
|
||||
</vector>
|
||||
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="12dp"
|
||||
android:bottomRightRadius="12dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
|
||||
</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="true" />
|
||||
<item android:drawable="@drawable/step_check" android:state_selected="false" />
|
||||
|
||||
</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/step_uncheck" />
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="12dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/view_all_background.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="#2A303E" /> <!-- 设置按钮的背景颜色 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="80dp"
|
||||
android:bottomRightRadius="80dp"
|
||||
android:topLeftRadius="80dp"
|
||||
android:topRightRadius="80dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/view_all_title_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/white" /> <!-- 选中状态下的文本颜色 -->
|
||||
<item android:color="@color/tab_uncheck" />
|
||||
</selector>
|
||||
55
app/src/main/res/layout/activity_all.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<?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/all_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.AllActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/allactivity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="@string/all"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/all_activity_fragment"
|
||||
android:name="com.exquisite.fragment.AllFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="60dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/allactivity" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
126
app/src/main/res/layout/activity_key_board_settings.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?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/keyboard_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.KeyBoardSettingsActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="@string/keyboardsettings"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="40dp"
|
||||
android:paddingEnd="40dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_title">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:paddingStart="15.5dp"
|
||||
android:paddingEnd="15.5dp"
|
||||
android:text="@string/setting_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/step1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/step_selector"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/step1_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_check" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step1_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="@string/step1"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/step2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/step_selector"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/step2_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_check" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step2_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="@string/step2"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
31
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?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/mainactivity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.MainActivity">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/main_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_tabLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/main_tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="7dp"
|
||||
android:layout_marginRight="7dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/butoon_tablayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:tabIndicatorHeight="0dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
188
app/src/main/res/layout/activity_preview.xml
Normal file
@ -0,0 +1,188 @@
|
||||
<?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/preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.PreviewActivity">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detail_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detail_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="@string/detail"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detailcenter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/detail_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/preview_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/image_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detail_recom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/detailcenter">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/image_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/recommended"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/text_more"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/detail_recom">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/text_more"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/preview_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/view_all_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/view_all"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/icon" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/detail_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_more" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detail_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/view_all_background"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/download_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/step1_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/icon_down" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step1_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="@string/down_text"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
76
app/src/main/res/layout/activity_search.xml
Normal file
@ -0,0 +1,76 @@
|
||||
<?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/search_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.SearchActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:background="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cancel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/cancel" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="80dp"
|
||||
android:background="@drawable/search_edit"
|
||||
android:padding="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cancel"
|
||||
app:layout_constraintStart_toEndOf="@id/search_back"
|
||||
app:layout_constraintTop_toTopOf="@id/cancel">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/search"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<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/cancel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/faile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cancel" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
69
app/src/main/res/layout/activity_splash.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?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/splashactivity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.activity.SplashActivity">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginStart="48dp"
|
||||
android:layout_marginTop="79dp"
|
||||
android:src="@mipmap/logo_hint"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginEnd="56dp"
|
||||
android:layout_marginBottom="59dp"
|
||||
android:src="@mipmap/logo_hint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/logo" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/logo" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
18
app/src/main/res/layout/custom_tablayout.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?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:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textColor="@drawable/view_all_title_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
30
app/src/main/res/layout/fragment_all.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?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/all_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
tools:context="com.exquisite.fragment.AllFragment">
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/all_tabLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:tabMode="scrollable"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/all_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="50dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/all_tabLayout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
14
app/src/main/res/layout/fragment_foryou.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="com.exquisite.fragment.FragmentForyou">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/keyboard_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
|
||||
</FrameLayout>
|
||||
92
app/src/main/res/layout/fragment_page_one.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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/background"
|
||||
tools:context="com.exquisite.fragment.PageOneFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_linear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/for_you"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/for_you"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_image"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/view_all"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/view_all_background"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/view_all"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/icon" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_keyboard_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_linear" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
185
app/src/main/res/layout/fragment_page_two.xml
Normal file
@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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/background"
|
||||
tools:context="com.exquisite.fragment.PageTwoFragment">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@mipmap/logo"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/logo"
|
||||
app:layout_constraintStart_toEndOf="@id/logo"
|
||||
app:layout_constraintTop_toTopOf="@id/logo" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/keyboard_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/keyboard"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/keyboard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/keyboardsettings"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/keyboard"
|
||||
app:layout_constraintStart_toEndOf="@id/keyboard"
|
||||
app:layout_constraintTop_toTopOf="@id/keyboard" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/keyboard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/keyboard" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rate_us"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rateus"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/rateus"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/rate_us"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rateus"
|
||||
app:layout_constraintStart_toEndOf="@id/rateus"
|
||||
app:layout_constraintTop_toTopOf="@id/rateus" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rateus"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/rateus" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/privacy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_privacy"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/privacy"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/privacy"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/img_privacy"
|
||||
app:layout_constraintStart_toEndOf="@id/img_privacy"
|
||||
app:layout_constraintTop_toTopOf="@id/img_privacy" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/img_privacy"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/img_privacy" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
19
app/src/main/res/layout/image_list.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?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/constraint_layout_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context="com.exquisite.fragment.PageOneFragment">
|
||||
|
||||
<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>
|
||||
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.exquisite.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/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/logo.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/logo_hint.png
Normal file
|
After Width: | Height: | Size: 2.6 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.Demo08" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
9
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="background">#1F1D2B</color>
|
||||
<color name="step_check">#DED0DC</color>
|
||||
<color name="step_uncheck">#2A303E</color>
|
||||
<color name="tab_uncheck">#696969</color>
|
||||
</resources>
|
||||
29
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<resources>
|
||||
<string name="app_name">Keyboard Skins</string>
|
||||
<string name="keyboard">Keyboard</string>
|
||||
<string name="keyboardsettings">Keyboard Settings</string>
|
||||
<string name="rate_us">Rate us</string>
|
||||
<string name="privacy">Privacy</string>
|
||||
<string name="for_you">For You</string>
|
||||
<string name="view_all">View all</string>
|
||||
<string name="all">All</string>
|
||||
<string name="setting_text">Activate PassionCool Keyboard to \n enable MORE functions!</string>
|
||||
<string name="step1">Step 1:Select</string>
|
||||
<string name="step2">Step 2:Enabled</string>
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="detail">Detail</string>
|
||||
<string name="down_text">Download & Apply</string>
|
||||
<string name="url_privacy">https://minallcornia.bitbucket.io/privacy.html</string>
|
||||
<string name="recommended">Recommended Themes</string>
|
||||
<string name="text_hint">For normal use, please enter the setting to complete the setting steps.</string>
|
||||
<string name="set_successful">Apply the keyboard skin successfully</string>
|
||||
<string name="text_more">More recommendations</string>
|
||||
<string name="text_step_successful">Successfully set up \n Now you can download keyboard</string>
|
||||
<string name="text_step_failed">Setting failed ! Please try again</string>
|
||||
<string name="text_download_failed">Download failed</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="nofiles">The keyboard is not available</string>
|
||||
<string name="text_tips">Please enter the content</string>
|
||||
<string name="text_null">Query is empty</string>
|
||||
<string name="search">Search</string>
|
||||
</resources>
|
||||
14
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.Demo08" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Demo08" parent="Base.Theme.Demo08" />
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
<!-- <item name="android:statusBarColor" />-->
|
||||
</style>
|
||||
</resources>
|
||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
16
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
10
app/src/main/res/xml/im.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<input-method xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<subtype
|
||||
android:icon="@drawable/ic_launcher_background"
|
||||
android:imeSubtypeLocale="en_US"
|
||||
android:imeSubtypeMode = "keyboard"
|
||||
android:label="@string/app_name" />
|
||||
|
||||
</input-method>
|
||||
149
app/src/main/res/xml/view_1.xml
Normal file
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
|
||||
<Row
|
||||
android:keyWidth="9.45%"
|
||||
android:keyHeight="50dp"
|
||||
android:horizontalGap="0.5%"
|
||||
android:rowEdgeFlags="top">
|
||||
<Key
|
||||
android:codes="113"
|
||||
android:keyEdgeFlags="left"
|
||||
android:keyLabel="q" />
|
||||
<Key
|
||||
android:codes="119"
|
||||
android:keyLabel="w" />
|
||||
<Key
|
||||
android:codes="101"
|
||||
android:keyLabel="e" />
|
||||
<Key
|
||||
android:codes="114"
|
||||
android:keyLabel="r" />
|
||||
<Key
|
||||
android:codes="116"
|
||||
android:keyLabel="t" />
|
||||
<Key
|
||||
android:codes="121"
|
||||
android:keyLabel="y" />
|
||||
<Key
|
||||
android:codes="117"
|
||||
android:keyLabel="u" />
|
||||
<Key
|
||||
android:codes="105"
|
||||
android:keyLabel="i" />
|
||||
<Key
|
||||
android:codes="111"
|
||||
android:keyLabel="o" />
|
||||
<Key
|
||||
android:codes="112"
|
||||
android:keyEdgeFlags="right"
|
||||
android:keyLabel="p" />
|
||||
</Row>
|
||||
<Row
|
||||
android:keyWidth="9.444444%"
|
||||
android:keyHeight="50dp"
|
||||
android:horizontalGap="0.5%">
|
||||
<Key
|
||||
android:codes="97"
|
||||
android:horizontalGap="5.5%"
|
||||
android:keyLabel="a" />
|
||||
<Key
|
||||
android:codes="115"
|
||||
android:keyLabel="s" />
|
||||
<Key
|
||||
android:codes="100"
|
||||
android:keyLabel="d" />
|
||||
<Key
|
||||
android:codes="102"
|
||||
android:keyLabel="f" />
|
||||
<Key
|
||||
android:codes="103"
|
||||
android:keyLabel="g" />
|
||||
<Key
|
||||
android:codes="104"
|
||||
android:keyLabel="h" />
|
||||
<Key
|
||||
android:codes="106"
|
||||
android:keyLabel="j" />
|
||||
<Key
|
||||
android:codes="107"
|
||||
android:keyLabel="k" />
|
||||
<Key
|
||||
android:codes="108"
|
||||
android:keyLabel="l" />
|
||||
</Row>
|
||||
<Row
|
||||
android:keyHeight="50dp"
|
||||
android:keyWidth="9.5%"
|
||||
android:horizontalGap="0.5%">
|
||||
|
||||
<Key
|
||||
android:codes="-1"
|
||||
android:isModifier="true"
|
||||
android:isSticky="true"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="left" />
|
||||
<Key
|
||||
android:codes="122"
|
||||
android:keyLabel="z" />
|
||||
<Key
|
||||
android:codes="120"
|
||||
android:keyLabel="x" />
|
||||
<Key
|
||||
android:codes="99"
|
||||
android:keyLabel="c" />
|
||||
<Key
|
||||
android:codes="118"
|
||||
android:keyLabel="v" />
|
||||
<Key
|
||||
android:codes="98"
|
||||
android:keyLabel="b" />
|
||||
<Key
|
||||
android:codes="110"
|
||||
android:keyLabel="n" />
|
||||
<Key
|
||||
android:codes="109"
|
||||
android:keyLabel="m" />
|
||||
|
||||
<Key
|
||||
android:codes="-5"
|
||||
android:isModifier="true"
|
||||
android:isRepeatable="true"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
<Row
|
||||
android:horizontalGap="0.5%"
|
||||
android:keyHeight="50dp"
|
||||
android:rowEdgeFlags="bottom"
|
||||
android:keyWidth="9.5%">
|
||||
|
||||
<Key
|
||||
android:codes="-2"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="left"
|
||||
android:keyLabel="\?123" />
|
||||
|
||||
<Key
|
||||
android:codes="44"
|
||||
android:keyLabel="," />
|
||||
<Key
|
||||
android:codes="32"
|
||||
android:keyWidth="49.5%"
|
||||
android:keyLabel="English" />
|
||||
|
||||
<Key
|
||||
android:codes="46"
|
||||
android:keyLabel="." />
|
||||
|
||||
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyLabel="Done"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
</Keyboard>
|
||||