V1.0.4(5) TopOn 聚合(mintegral、unityads、liftoff(vungle)、Bigo)
This commit is contained in:
parent
f1b4823a53
commit
198d50a118
@ -17,8 +17,8 @@ android {
|
||||
applicationId = "com.sunny.tools.app.soft"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 4
|
||||
versionName = "1.0.3"
|
||||
versionCode = 5
|
||||
versionName = "1.0.4"
|
||||
setProperty("archivesBaseName", "Custom Keyboard_V" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -36,7 +36,9 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
|
||||
viewBinding = true
|
||||
}
|
||||
}
|
||||
@ -67,5 +69,53 @@ dependencies {
|
||||
|
||||
|
||||
|
||||
//-----------------------------TopOn 聚合(mintegral、unityads、liftoff(vungle)、Bigo)
|
||||
//Anythink (Necessary)
|
||||
implementation("com.anythink.sdk:core-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:nativead-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:banner-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:interstitial-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:rewardedvideo-tpn:6.3.68")
|
||||
implementation("com.anythink.sdk:splash-tpn:6.3.68")
|
||||
|
||||
//Androidx (Necessary)
|
||||
implementation("androidx.appcompat:appcompat:1.1.0")
|
||||
implementation("androidx.browser:browser:1.4.0")
|
||||
|
||||
//Vungle
|
||||
implementation("com.anythink.sdk:adapter-tpn-vungle:6.3.68")
|
||||
implementation("com.vungle:vungle-ads:7.3.2")
|
||||
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||
|
||||
//UnityAds
|
||||
implementation("com.anythink.sdk:adapter-tpn-unityads:6.3.68")
|
||||
implementation("com.unity3d.ads:unity-ads:4.9.3")
|
||||
|
||||
//Bigo
|
||||
implementation("com.anythink.sdk:adapter-tpn-bigo:6.3.68")
|
||||
implementation("com.bigossp:bigo-ads:4.7.4")
|
||||
|
||||
//Mintegral
|
||||
implementation("com.anythink.sdk:adapter-tpn-mintegral-nonchina:6.3.68")
|
||||
implementation("com.mbridge.msdk.oversea:reward:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:newinterstitial:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbnative:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbnativeadvanced:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbsplash:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbbanner:16.7.51")
|
||||
implementation("com.mbridge.msdk.oversea:mbbid:16.7.51")
|
||||
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||
|
||||
//Tramini
|
||||
implementation("com.anythink.sdk:tramini-plugin-tpn:6.3.68")
|
||||
//-----------------------------TopOn 聚合
|
||||
|
||||
|
||||
// Debugger UI Tools
|
||||
implementation ("com.anythink.sdk:debugger-ui:1.0.7")
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
3
app/keyinfo
Normal file
3
app/keyinfo
Normal file
@ -0,0 +1,3 @@
|
||||
file:CustomKeyboard.jks
|
||||
alias:CustomKeyboardkey0
|
||||
pwd:CustomKeyboard
|
||||
78
app/proguard-rules.pro
vendored
78
app/proguard-rules.pro
vendored
@ -19,7 +19,81 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity { *; }
|
||||
-keep class com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity { *; }
|
||||
-keep class com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity { *; }
|
||||
-keep class com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity { *; }
|
||||
|
||||
|
||||
#---------------------------------TopOn 聚合
|
||||
# Vungle
|
||||
-dontwarn com.vungle.ads.**
|
||||
-keepclassmembers class com.vungle.ads.** {
|
||||
*;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Google
|
||||
-keep class com.google.android.gms.** { *; }
|
||||
-dontwarn com.google.android.gms.**
|
||||
|
||||
|
||||
|
||||
|
||||
# START OkHttp + Okio
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
|
||||
-dontwarn okhttp3.internal.platform.**
|
||||
-dontwarn org.conscrypt.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
-dontwarn org.openjsse.**
|
||||
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
|
||||
# END OkHttp + Okio
|
||||
|
||||
|
||||
# START Protobuf
|
||||
-dontwarn com.google.protobuf.**
|
||||
-keepclassmembers class com.google.protobuf.** {
|
||||
*;
|
||||
}
|
||||
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||
|
||||
|
||||
# END Protobuf
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class com.mbridge.** {*; }
|
||||
-keep interface com.mbridge.** {*; }
|
||||
-keep class android.support.v4.** { *; }
|
||||
-dontwarn com.mbridge.**
|
||||
-keep class **.R$* { public static final int mbridge*; }
|
||||
-keep public class com.mbridge.* extends androidx.** { *; }
|
||||
-keep public class androidx.viewpager.widget.PagerAdapter{ *; }
|
||||
-keep public class androidx.viewpager.widget.ViewPager.OnPageChangeListener{ *; }
|
||||
-keep interface androidx.annotation.IntDef{ *; }
|
||||
-keep interface androidx.annotation.Nullable{ *; }
|
||||
-keep interface androidx.annotation.CheckResult{ *; }
|
||||
-keep interface androidx.annotation.NonNull{ *; }
|
||||
-keep public class androidx.fragment.app.Fragment{ *; }
|
||||
-keep public class androidx.core.content.FileProvider{ *; }
|
||||
-keep public class androidx.core.app.NotificationCompat{ *; }
|
||||
-keep public class androidx.appcompat.widget.AppCompatImageView { *; }
|
||||
-keep public class androidx.recyclerview.*{ *; }
|
||||
|
||||
#---------------------------------TopOn 聚合
|
||||
@ -2,36 +2,50 @@ package com.sunny.app.soft.timberkeyboardnew
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.anythink.core.api.ATSDK
|
||||
import com.anythink.core.api.NetTrafficeCallback
|
||||
import com.anythink.debug.api.ATDebuggerUITest
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
|
||||
|
||||
class App : Application() {
|
||||
|
||||
companion object {
|
||||
lateinit var appContext: Context
|
||||
|
||||
|
||||
const val AD_INIT = "on_action"
|
||||
|
||||
|
||||
const val APP_ID ="666919bc88cc429f2d801b21"
|
||||
var SDKOK = false
|
||||
|
||||
const val TAG ="============="
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
private val debugKey = "5a963ac260793c4ffdf9580cd63743d4ce258e51"
|
||||
private val appId = "h669e2559e94df"
|
||||
private val appKey = "a6c2a655e13bd18d58cb7ccaf46ac8468"
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
appContext = this
|
||||
initLiftoff()
|
||||
initTopOn()
|
||||
|
||||
}
|
||||
|
||||
private fun initTopOn() {
|
||||
|
||||
private fun initLiftoff() {
|
||||
ATSDK.checkIsEuTraffic(this, object : NetTrafficeCallback {
|
||||
override fun onResultCallback(isEU: Boolean) {
|
||||
Log.e(TAG, "onResultCallback:$isEU")
|
||||
if (isEU && ATSDK.getGDPRDataLevel(this@App) == ATSDK.UNKNOWN) {
|
||||
ATSDK.showGdprAuth(this@App)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onErrorCallback(errorMsg: String) {
|
||||
Log.e(TAG, "onErrorCallback:$errorMsg")
|
||||
}
|
||||
})
|
||||
|
||||
ATSDK.init( this, appId, appKey)
|
||||
// ATSDK.setNetworkLogDebug(true)
|
||||
AdManager.loadAllAd()
|
||||
|
||||
//测试工具
|
||||
//ATDebuggerUITest.showDebuggerUI(this,debugKey)
|
||||
}
|
||||
}
|
||||
@ -3,15 +3,15 @@ package com.sunny.app.soft.timberkeyboardnew.service
|
||||
import android.inputmethodservice.InputMethodService
|
||||
import android.inputmethodservice.Keyboard
|
||||
import android.inputmethodservice.KeyboardView
|
||||
import android.os.Build
|
||||
import android.os.SystemClock
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.annotation.RequiresApi
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ViewInputBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
|
||||
|
||||
class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
||||
|
||||
private lateinit var binding: ViewInputBinding
|
||||
@ -128,7 +128,10 @@ class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListe
|
||||
|
||||
// 点击完成
|
||||
Keyboard.KEYCODE_DONE -> {
|
||||
// currentInputConnection.performEditorAction(EditorInfo.IME_ACTION_SEARCH)
|
||||
currentInputConnection.performEditorAction(EditorInfo.IME_ACTION_SEARCH)
|
||||
val imm = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(binding.myCustomInput.windowToken, 0)
|
||||
}
|
||||
|
||||
Keyboard.KEYCODE_MODE_CHANGE -> {
|
||||
|
||||
@ -10,6 +10,7 @@ object AppConstant {
|
||||
const val SHIFT_NUMBER = -300
|
||||
const val SHIFT_SYMBOL = -301
|
||||
const val KEY_CUR_Path = "all_path"
|
||||
const val KEY_CUR_STYLE = "cur_style"
|
||||
const val KEY_CUR_Path_img = "all_path_img"
|
||||
const val xml0 = 24
|
||||
const val xml1 = 25
|
||||
@ -42,10 +43,11 @@ object AppConstant {
|
||||
|
||||
fun getDeleteRes(id: String) = String.format(App.appContext.getString(R.string.delete_res), id)
|
||||
|
||||
fun getFunBg(id: String) = String.format(App.appContext.getString(R.string.but_res), id)
|
||||
|
||||
fun getCapsenable(id: String) = String.format(App.appContext.getString(R.string.caps_res), id)
|
||||
fun getCaps(id: String) = String.format(App.appContext.getString(R.string.caps_no_res), id)
|
||||
|
||||
fun getnormalBg(id: String) = String.format(App.appContext.getString(R.string.normal_res), id)
|
||||
fun getnormalBg(id: String,style:Int=1) = String.format(App.appContext.getString(R.string.normal_res), id,style)
|
||||
|
||||
fun getTextColor(id: String,style:Int=1) = String.format(App.appContext.getString(R.string.correct_text_color), id,style)
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.topon
|
||||
|
||||
interface AdListener {
|
||||
fun showSuccess()
|
||||
|
||||
fun showFail()
|
||||
|
||||
fun showClose()
|
||||
}
|
||||
@ -0,0 +1,177 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.topon
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.CountDownTimer
|
||||
import android.util.Log
|
||||
import com.anythink.core.api.ATAdInfo
|
||||
import com.anythink.core.api.AdError
|
||||
import com.anythink.interstitial.api.ATInterstitial
|
||||
import com.anythink.interstitial.api.ATInterstitialListener
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
|
||||
|
||||
object AdManager {
|
||||
const val type_no_cache = 0
|
||||
const val type_has_cache = 1
|
||||
const val type_show_success = 2
|
||||
const val type_show_close = 3
|
||||
const val type_show_fail = 4
|
||||
|
||||
/**
|
||||
* 广告id: n669e25a626d80
|
||||
* n669e25a65c060
|
||||
* n669e25a707130
|
||||
*/
|
||||
const val place1Id = "n669e25a626d80"
|
||||
const val place2Id = "n669e25a65c060"
|
||||
const val place3Id = "n669e25a707130"
|
||||
|
||||
val list = mutableListOf<ATInterstitial>()
|
||||
@JvmStatic
|
||||
fun loadAllAd() {
|
||||
if (list.size <= 0) {
|
||||
val mInterstitialAd1 = ATInterstitial(App.appContext, place1Id)
|
||||
val mInterstitialAd2 = ATInterstitial(App.appContext, place2Id)
|
||||
val mInterstitialAd3 = ATInterstitial(App.appContext, place3Id)
|
||||
list.add(mInterstitialAd1)
|
||||
list.add(mInterstitialAd2)
|
||||
list.add(mInterstitialAd3)
|
||||
}
|
||||
for (ad in list) {
|
||||
if (!ad.isAdReady) {
|
||||
Log.d(App.TAG,"--------------start--load ad=${ad.mPlacementId}")
|
||||
setCallBack(ad,object :AdListener{
|
||||
override fun showSuccess() {
|
||||
|
||||
}
|
||||
|
||||
override fun showFail() {
|
||||
|
||||
}
|
||||
|
||||
override fun showClose() {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
ad.load()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@JvmStatic
|
||||
fun getReadyAd(): ATInterstitial? {
|
||||
list.shuffle()
|
||||
for (ad in list) {
|
||||
if (ad.isAdReady) {
|
||||
return ad
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@JvmStatic
|
||||
fun showWelcomeAd(activity: Activity,totalTim: Long, goMain: () -> Unit): CountDownTimer {
|
||||
var alreadyShow = false
|
||||
var timer = object : CountDownTimer(totalTim, 100) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
if (!alreadyShow) {
|
||||
showAD(activity) {
|
||||
Log.d(App.TAG, "------------showAD:${it} ")
|
||||
if (it == type_has_cache) {
|
||||
alreadyShow = true
|
||||
}
|
||||
if (it == type_show_close || it == type_show_fail) {
|
||||
goMain.invoke()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
if (!alreadyShow) {
|
||||
showAD(activity) {
|
||||
Log.d(App.TAG, "------------onFinish:${it} ")
|
||||
if (it == type_show_close || it == type_show_fail || it == type_no_cache) {
|
||||
goMain.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return timer
|
||||
}
|
||||
|
||||
private fun setCallBack(ad: ATInterstitial, listener: AdListener) {
|
||||
ad.setAdListener(object : ATInterstitialListener {
|
||||
override fun onInterstitialAdLoaded() {
|
||||
Log.d(App.TAG, "LoadLoaded ${ad.mPlacementId}")
|
||||
}
|
||||
|
||||
override fun onInterstitialAdLoadFail(p0: AdError?) {
|
||||
Log.d(App.TAG, "LoadFail:${p0?.code} ${p0?.fullErrorInfo}")
|
||||
}
|
||||
|
||||
override fun onInterstitialAdClicked(p0: ATAdInfo?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onInterstitialAdShow(p0: ATAdInfo?) {
|
||||
Log.d(App.TAG, "AdShow ${p0?.showId} ")
|
||||
listener.showSuccess()
|
||||
ad.load()
|
||||
}
|
||||
|
||||
override fun onInterstitialAdClose(p0: ATAdInfo?) {
|
||||
listener.showClose()
|
||||
}
|
||||
|
||||
override fun onInterstitialAdVideoStart(p0: ATAdInfo?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onInterstitialAdVideoEnd(p0: ATAdInfo?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onInterstitialAdVideoError(p0: AdError?) {
|
||||
listener.showFail()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@JvmStatic
|
||||
fun showAD(activity: Activity, action: (type: Int) -> Unit) {
|
||||
val readyAd = getReadyAd()
|
||||
if (readyAd!= null) {
|
||||
Log.d(App.TAG, "readyAd ${readyAd.mPlacementId} ")
|
||||
action.invoke(type_has_cache)
|
||||
setCallBack(readyAd,object : AdListener {
|
||||
override fun showSuccess() {
|
||||
action.invoke(type_show_success)
|
||||
}
|
||||
|
||||
override fun showFail() {
|
||||
action.invoke(type_show_fail)
|
||||
}
|
||||
|
||||
override fun showClose() {
|
||||
action.invoke(type_show_close)
|
||||
}
|
||||
|
||||
})
|
||||
readyAd.show(activity)
|
||||
} else {
|
||||
action.invoke(type_no_cache)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
@ -11,8 +12,12 @@ abstract class BaseActivity : AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(setRootView())
|
||||
initView()
|
||||
if (loadAd()) {
|
||||
AdManager.loadAllAd()
|
||||
}
|
||||
}
|
||||
|
||||
abstract fun loadAd(): Boolean
|
||||
abstract fun setRootView(): View
|
||||
|
||||
open fun initView() {
|
||||
|
||||
@ -8,6 +8,9 @@ import android.graphics.drawable.BitmapDrawable
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
@ -19,6 +22,8 @@ import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityDownloadBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.KeyboardManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.ZipTools
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.KeyAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.ApplyListener
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
@ -41,6 +46,8 @@ class DownloadActivity :
|
||||
|
||||
private lateinit var sp: SharedPreferences
|
||||
|
||||
private var selectedStyle = 1
|
||||
override fun loadAd(): Boolean = true
|
||||
override fun setRootView(): View {
|
||||
binding = ActivityDownloadBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
@ -48,6 +55,7 @@ class DownloadActivity :
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.downloadProgress.visibility = View.VISIBLE
|
||||
backgroundEntity = intent.getSerializableExtra(AppConstant.KEY_EXTRA) as BackgroundEntity
|
||||
sp = getSharedPreferences(
|
||||
AppConstant.SHARE_NAME, Context.MODE_PRIVATE
|
||||
@ -83,15 +91,53 @@ class DownloadActivity :
|
||||
val cacheDir = cacheDir
|
||||
val dataUrl = backgroundEntity.contentPath
|
||||
zipPath = "$cacheDir/$dataUrl"
|
||||
|
||||
val zipFile = File(unzipPath)
|
||||
if (!zipFile.exists()) {
|
||||
getZipData(
|
||||
backgroundEntity.skinNumber,
|
||||
backgroundEntity.contentPath,
|
||||
this@DownloadActivity,
|
||||
this
|
||||
)
|
||||
}else{
|
||||
binding.downloadProgress.visibility = View.GONE
|
||||
initList()
|
||||
}
|
||||
}
|
||||
|
||||
private fun initList(){
|
||||
val listOf = mutableListOf<String>()
|
||||
backgroundEntity.skinNumber.let {
|
||||
val unzipPath = "${cacheDir}/${it}/skin_${it}/"
|
||||
for(i in 0 until 5){
|
||||
val plus = unzipPath.plus(AppConstant.getnormalBg(it.toString(), i + 1))
|
||||
if(File(plus).exists()){
|
||||
listOf.add(plus)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val keyAdapter = KeyAdapter(this, listOf) {
|
||||
selectedStyle = it+1
|
||||
}
|
||||
binding.listRecycler.run {
|
||||
adapter = keyAdapter
|
||||
layoutManager = LinearLayoutManager(this@DownloadActivity).apply {
|
||||
orientation = LinearLayoutManager.HORIZONTAL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun onShowAd() {
|
||||
|
||||
// AdManager.showAd(AdManager.adPos_2) {
|
||||
// if (it == AdManager.SHOW_FAIL || it == AdManager.NO_CACHE || it == AdManager.SHOW_CLOSE) {
|
||||
AdManager.showAD(this) {
|
||||
if (it == AdManager.type_show_fail || it == AdManager.type_no_cache || it == AdManager.type_show_close) {
|
||||
startSetSkin()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -133,9 +179,7 @@ class DownloadActivity :
|
||||
): Boolean {
|
||||
resource?.let {
|
||||
Log.d("----------", "it.absolutePath=${it.absolutePath}")
|
||||
|
||||
val edit = sp.edit()
|
||||
// 存放键值对
|
||||
edit.run {
|
||||
putString(
|
||||
"${AppConstant.KEY_CUR_Path_img}_${backgroundEntity.skinNumber}",
|
||||
@ -187,34 +231,26 @@ class DownloadActivity :
|
||||
binding.downloadProgress.visibility = View.VISIBLE
|
||||
|
||||
val zipFile = File(unzipPath)
|
||||
|
||||
if (zipFile.exists()) {
|
||||
// val allThemePath: String = getAllThemePath(backgroundEntity.skinNumber.toString())
|
||||
val edit = sp.edit()
|
||||
edit.run {
|
||||
putString(AppConstant.KEY_CUR_Path, backgroundEntity.skinNumber.toString())
|
||||
apply()
|
||||
}
|
||||
|
||||
binding.downloadProgress.visibility = View.GONE
|
||||
Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show()
|
||||
finish()
|
||||
|
||||
} else {
|
||||
getZipData(
|
||||
backgroundEntity.skinNumber,
|
||||
backgroundEntity.contentPath,
|
||||
this@DownloadActivity,
|
||||
this
|
||||
)
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getAllThemePath(zip: String): String {
|
||||
val result = sp.getString(zip, "")
|
||||
return result!!
|
||||
private fun apply() {
|
||||
val edit = sp.edit()
|
||||
edit.run {
|
||||
putString(AppConstant.KEY_CUR_Path, backgroundEntity.skinNumber.toString())
|
||||
putInt(AppConstant.KEY_CUR_STYLE,selectedStyle)
|
||||
apply()
|
||||
}
|
||||
|
||||
binding.downloadProgress.visibility = View.GONE
|
||||
Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show()
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
|
||||
private fun getZipData(
|
||||
skinNumber: Int,
|
||||
contentPath: String,
|
||||
@ -300,24 +336,10 @@ class DownloadActivity :
|
||||
override fun applyListener(isSuccess: Boolean, str: String) {
|
||||
binding.downloadProgress.visibility = View.GONE
|
||||
if (isSuccess) {
|
||||
val lastIndexOf: Int = str.lastIndexOf(AppConstant.res_path)
|
||||
val substring = str.subSequence(0, lastIndexOf + AppConstant.res_path.length).toString()
|
||||
val edit = sp.edit()
|
||||
edit.run {
|
||||
putString(AppConstant.KEY_CUR_Path, backgroundEntity.skinNumber.toString())
|
||||
apply()
|
||||
}
|
||||
edit.run {
|
||||
putString(
|
||||
backgroundEntity.skinNumber.toString(),
|
||||
backgroundEntity.skinNumber.toString()
|
||||
)
|
||||
apply()
|
||||
}
|
||||
Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show()
|
||||
finish()
|
||||
Log.d("-------","=----true")
|
||||
initList()
|
||||
} else {
|
||||
Toast.makeText(this, getString(R.string.fail_apply), Toast.LENGTH_LONG).show()
|
||||
Toast.makeText(this, getString(R.string.reenter), Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import android.content.Intent
|
||||
import android.os.CountDownTimer
|
||||
import android.view.View
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityLoadingBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
|
||||
class LoadingActivity : BaseActivity() {
|
||||
|
||||
@ -11,9 +12,9 @@ class LoadingActivity : BaseActivity() {
|
||||
|
||||
private lateinit var timer: CountDownTimer
|
||||
|
||||
private val time = 11000L
|
||||
|
||||
private val time = 12000L
|
||||
|
||||
override fun loadAd(): Boolean = false
|
||||
override fun setRootView(): View {
|
||||
binding = ActivityLoadingBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
@ -27,9 +28,10 @@ class LoadingActivity : BaseActivity() {
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
|
||||
// timer = AdManager.showWelComeAd(time) {
|
||||
timer = AdManager.showWelcomeAd(this@LoadingActivity,time) {
|
||||
intoMainActivity()
|
||||
// }
|
||||
}
|
||||
timer.start()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityMainBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.MainViewPagerAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.fragment.HomeFragment
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.fragment.SettingFragment
|
||||
@ -16,6 +17,7 @@ class MainActivity :
|
||||
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var fragmentList: MutableList<Fragment>
|
||||
override fun loadAd(): Boolean = true
|
||||
|
||||
override fun setRootView(): View {
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
@ -24,24 +26,6 @@ class MainActivity :
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
// InterstitialAd(this, AdManager.placementId1, AdConfig().apply { }).apply {
|
||||
// AdManager.setCallBack(this, object : AdCallBack {
|
||||
// override fun onLoaded() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// override fun onShowFail() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// override fun onClose() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// })
|
||||
// load()
|
||||
// }
|
||||
|
||||
initViewPager()
|
||||
initTabButton()
|
||||
}
|
||||
@ -68,16 +52,12 @@ class MainActivity :
|
||||
0 -> {
|
||||
binding.mainTabHome.isSelected = true
|
||||
binding.mainTabSet.isSelected = false
|
||||
binding.mainTvHome.setTextColor(getColor(R.color.orange))
|
||||
binding.mainTvSetting.setTextColor(getColor(R.color.black))
|
||||
binding.mainViewpager.currentItem = 0
|
||||
}
|
||||
|
||||
1 -> {
|
||||
binding.mainTabHome.isSelected = false
|
||||
binding.mainTabSet.isSelected = true
|
||||
binding.mainTvHome.setTextColor(getColor(R.color.black))
|
||||
binding.mainTvSetting.setTextColor(getColor(R.color.orange))
|
||||
binding.mainViewpager.currentItem = 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class SelectActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private fun initRecyclerView() {
|
||||
binding.selectRecyclerView.apply {
|
||||
layoutManager = GridLayoutManager(this@SelectActivity, 2)
|
||||
layoutManager = GridLayoutManager(this@SelectActivity, 1)
|
||||
adapter = SelectAdapter(context, categoryEntity.backgrounds, object : OnBgItemClickListener {
|
||||
override fun onItemClick(position: Int, backgroundEntity: BackgroundEntity) {
|
||||
val intent = Intent(this@SelectActivity, DownloadActivity::class.java)
|
||||
@ -41,7 +41,7 @@ class SelectActivity : BaseActivity(), View.OnClickListener {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun loadAd(): Boolean = true
|
||||
private fun initTitle() {
|
||||
binding.selectTitle.text = categoryEntity.name
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ class SetKeyboardActivity :
|
||||
register()
|
||||
initButton()
|
||||
}
|
||||
|
||||
override fun loadAd(): Boolean = true
|
||||
private fun initButton() {
|
||||
binding.setKeyboardBack.setOnClickListener(this)
|
||||
binding.setKeyboardSteps1.setOnClickListener(this)
|
||||
|
||||
@ -6,9 +6,11 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.RequestBuilder
|
||||
@ -36,10 +38,10 @@ class HomeViewAdapter(
|
||||
|
||||
val imgItemView: ImageView = itemView.findViewById(R.id.item_img)
|
||||
|
||||
val rootItemLayout: CardView = itemView.findViewById<CardView>(R.id.item_root)
|
||||
val rootItemLayout: LinearLayout = itemView.findViewById<LinearLayout>(R.id.item_root)
|
||||
|
||||
val pd: ProgressBar = itemView.findViewById<ProgressBar>(R.id.pb)
|
||||
|
||||
val view: View = itemView.findViewById(R.id.view_space)
|
||||
|
||||
fun loadImg(context: Context, url: String, img: ImageView) {
|
||||
|
||||
@ -99,6 +101,7 @@ class HomeViewAdapter(
|
||||
|
||||
override fun onBindViewHolder(holder: ItemViewHolder, position: Int) {
|
||||
val category = modelList[position]
|
||||
holder.view.isVisible = position == modelList.size-1
|
||||
|
||||
holder.loadImg(context, category.coverPath, holder.imgItemView)
|
||||
|
||||
|
||||
@ -0,0 +1,108 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.ui.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
|
||||
class KeyAdapter(
|
||||
private val context: Context,
|
||||
private val modelList: List<String>,
|
||||
private val listener: (Int) -> Unit
|
||||
) : RecyclerView.Adapter<KeyAdapter.ItemViewHolder>() {
|
||||
|
||||
private var selectedPos: Int = 0
|
||||
|
||||
inner class ItemViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
val imgItemView: ImageView = itemView.findViewById(R.id.item_img)
|
||||
|
||||
val rootItemLayout: RelativeLayout = itemView.findViewById<RelativeLayout>(R.id.item_root)
|
||||
|
||||
val pd: ProgressBar = itemView.findViewById<ProgressBar>(R.id.pb)
|
||||
val viewSelected: ImageView = itemView.findViewById(R.id.view_selected)
|
||||
|
||||
fun loadImg(context: Context, url: String, img: ImageView) {
|
||||
|
||||
try {
|
||||
Glide
|
||||
.with(context)
|
||||
.load(url)
|
||||
.thumbnail(0.5f)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.listener(object : RequestListener<Drawable> {
|
||||
override fun onLoadFailed(
|
||||
e: GlideException?,
|
||||
model: Any?,
|
||||
target: Target<Drawable>?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
|
||||
pd.visibility = View.INVISIBLE
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onResourceReady(
|
||||
resource: Drawable?,
|
||||
model: Any?,
|
||||
target: Target<Drawable>?,
|
||||
dataSource: DataSource?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
|
||||
pd.visibility = View.INVISIBLE
|
||||
|
||||
return false
|
||||
}
|
||||
})
|
||||
// .apply(
|
||||
// RequestOptions().placeholder(R.drawable.png_loading)
|
||||
// )
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
.into(img)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder {
|
||||
val view = LayoutInflater.from(context).inflate(R.layout.item_key, parent, false)
|
||||
return ItemViewHolder(view)
|
||||
}
|
||||
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return modelList.size
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ItemViewHolder, position: Int) {
|
||||
val category = modelList[position]
|
||||
holder.viewSelected.isVisible = selectedPos == position
|
||||
var curPos = position
|
||||
holder.loadImg(context, category, holder.imgItemView)
|
||||
|
||||
holder.rootItemLayout.setOnClickListener {
|
||||
selectedPos = curPos
|
||||
listener.invoke(selectedPos)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.sunny.app.soft.timberkeyboardnew.ui.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -93,6 +94,8 @@ class SelectAdapter(
|
||||
holder.rootItemLayout.setOnClickListener {
|
||||
listener.onItemClick(position, backgroundEntity)
|
||||
}
|
||||
|
||||
Log.d("-----------","--------------backgroundEntity.coverPath=${backgroundEntity.coverPath}")
|
||||
holder.loadImg(context, backgroundEntity.coverPath, holder.imgItemView)
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.sunny.app.soft.timberkeyboardnew.data.DataManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentHomeBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.activity.SelectActivity
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.HomeViewAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnItemClickListener
|
||||
@ -60,11 +61,11 @@ class HomeFragment :
|
||||
|
||||
|
||||
fun onShowAd() {
|
||||
// AdManager.showAd(AdManager.adPos_1) {
|
||||
// if (it == AdManager.SHOW_FAIL || it == AdManager.NO_CACHE || it == AdManager.SHOW_CLOSE) {
|
||||
AdManager.showAD(requireActivity()) {
|
||||
if (it == AdManager.type_show_fail || it == AdManager.type_no_cache || it == AdManager.type_show_close) {
|
||||
enterList()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -13,17 +13,18 @@ import android.graphics.drawable.Drawable
|
||||
import android.graphics.drawable.StateListDrawable
|
||||
import android.inputmethodservice.Keyboard
|
||||
import android.inputmethodservice.KeyboardView
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.util.Xml
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.anythink.debug.util.b
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import org.xmlpull.v1.XmlPullParser
|
||||
import java.io.File
|
||||
import java.io.StringReader
|
||||
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
class MyKeyboardView @JvmOverloads constructor(
|
||||
var myContext: Context,
|
||||
@ -67,27 +68,22 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun gettextcolor(colorXmlPath: String) {
|
||||
val file = File(colorXmlPath)
|
||||
if (!file.exists()) return
|
||||
val xmlP = Xml.newPullParser()
|
||||
|
||||
xmlP.setInput(StringReader(file.readText()))
|
||||
xmlP.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false)
|
||||
private fun gettextcolornew(filePath: String) {
|
||||
if(File(filePath).exists()){
|
||||
val decodeFile = BitmapFactory.decodeFile(filePath)
|
||||
val pixelColor: Int = decodeFile.getPixel(0, 0)
|
||||
val red = Color.red(pixelColor)
|
||||
val green = Color.green(pixelColor)
|
||||
val blue = Color.blue(pixelColor)
|
||||
|
||||
keycolor = Color.rgb(red, green, blue)
|
||||
|
||||
var eventT = xmlP.eventType
|
||||
while (eventT != XmlPullParser.END_DOCUMENT) {
|
||||
if (eventT == XmlPullParser.START_TAG && (xmlP.name == "color" || xmlP.name == "item")) {
|
||||
val value = xmlP.getAttributeValue(null, "name")
|
||||
if (value != null && value == AppConstant.title_color) {
|
||||
keycolor = Color.parseColor(xmlP.nextText())
|
||||
}
|
||||
}
|
||||
eventT = xmlP.next()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
init {
|
||||
val default =
|
||||
ContextCompat.getDrawable(context, R.drawable.png_keybg)
|
||||
@ -110,30 +106,26 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
|
||||
val unzipPath = "${con.cacheDir}/${Entity_ID}/skin_${Entity_ID}/"
|
||||
|
||||
val style = sp.getInt(AppConstant.KEY_CUR_STYLE, 1)
|
||||
|
||||
gettextcolornew(unzipPath.plus(AppConstant.getTextColor(Entity_ID,style)))
|
||||
|
||||
getbgic(
|
||||
con,
|
||||
unzipPath.plus(AppConstant.getnormalBg(Entity_ID))
|
||||
unzipPath.plus(AppConstant.getnormalBg(Entity_ID,style))
|
||||
)?.let { drawBG ->
|
||||
getbgic(
|
||||
con,
|
||||
unzipPath.plus(AppConstant.getnormalBg(Entity_ID))
|
||||
normalBackgroundDraw = getStatus(drawBG, drawBG)
|
||||
|
||||
)?.let { drawPressBG ->
|
||||
normalBackgroundDraw = getStatus(drawBG, drawPressBG)
|
||||
}
|
||||
}
|
||||
|
||||
gettextcolor(Entity_ID.plus(AppConstant.color_path))
|
||||
|
||||
|
||||
|
||||
getbgic(con, unzipPath.plus(AppConstant.getnormalBg(Entity_ID)))?.let { drawBG ->
|
||||
getbgic(
|
||||
con,
|
||||
unzipPath.plus(AppConstant.getnormalBg(Entity_ID))
|
||||
)?.let { drawPressBG ->
|
||||
spBackgroundDraw = getStatus(drawBG, drawPressBG)
|
||||
}
|
||||
|
||||
getbgic(con, unzipPath.plus(AppConstant.getnormalBg(Entity_ID,style)))?.let { drawBG ->
|
||||
|
||||
spBackgroundDraw = getStatus(drawBG, drawBG)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -147,14 +139,9 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
// ok
|
||||
getbgic(
|
||||
con,
|
||||
unzipPath.plus(AppConstant.getFunBg(Entity_ID))
|
||||
unzipPath.plus(AppConstant.getnormalBg(Entity_ID,style))
|
||||
)?.let { drawBG ->
|
||||
getbgic(
|
||||
con,
|
||||
unzipPath.plus(AppConstant.getFunBg(Entity_ID))
|
||||
)?.let { drawPressBG ->
|
||||
functionBackgroundDraw = getStatus(drawBG, drawPressBG)
|
||||
}
|
||||
functionBackgroundDraw = getStatus(drawBG, drawBG)
|
||||
|
||||
}
|
||||
|
||||
|
||||
10
app/src/main/res/drawable/selected.xml
Normal file
10
app/src/main/res/drawable/selected.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M512,85.3C277.3,85.3 85.3,277.3 85.3,512s192,426.7 426.7,426.7 426.7,-192 426.7,-426.7S746.7,85.3 512,85.3zM742.4,409.6l-256,256c-12.8,12.8 -34.1,12.8 -46.9,0h4.3c-4.3,0 -12.8,-4.3 -17.1,-8.5l-140.8,-140.8c-12.8,-12.8 -12.8,-34.1 0,-51.2 12.8,-12.8 34.1,-12.8 51.2,0l128,128 234.7,-234.7c12.8,-12.8 34.1,-12.8 46.9,0l4.3,4.3c4.3,12.8 4.3,34.1 -8.5,46.9z"
|
||||
android:fillColor="#1afa29"/>
|
||||
|
||||
</vector>
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="@color/orange" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
@ -2,14 +2,14 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white"/>
|
||||
<solid android:color="@color/transparent"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:state_pressed="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white"/>
|
||||
<solid android:color="@color/transparent"/>
|
||||
<corners android:radius="5dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@ -1,59 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<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/orange_light"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.SelectActivity">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@color/white"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/svg_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.SelectActivity">
|
||||
|
||||
<View
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/download_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:backgroundTint="@color/white"
|
||||
app:cardCornerRadius="20dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@color/white"
|
||||
android:padding="8dp"
|
||||
android:src="@mipmap/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -64,8 +60,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="10dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
android:layout_margin="15dp"
|
||||
app:cardCornerRadius="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_img"
|
||||
@ -74,48 +70,54 @@
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/png_item" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/download_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
android:visibility="invisible">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/orange" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/orange"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:text="@string/slect_key"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_download"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_download"
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/download_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
android:visibility="invisible">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/orange" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/orange_light"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.SetKeyboardActivity">
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@color/white"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/svg_back" />
|
||||
android:src="@mipmap/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@ -45,23 +45,19 @@
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:layout_margin="30dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="8dp"
|
||||
android:text="@string/setKeyboard_text"
|
||||
android:textColor="@color/orange"
|
||||
android:textSize="12sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="26dp"
|
||||
android:layout_marginEnd="26dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="60dp"
|
||||
android:lineSpacingExtra="8dp"
|
||||
android:text="@string/setKeyboard_text"
|
||||
android:textColor="@color/orange"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@ -74,7 +70,7 @@
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/setKeyboard_steps1"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
@ -87,7 +83,7 @@
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/setKeyboard_steps2"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -5,6 +5,7 @@
|
||||
android:id="@+id/main_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:context=".ui.activity.MainActivity">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
@ -34,24 +35,15 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/selector_menu" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_tv_home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/home"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -59,24 +51,15 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/selector_setting" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_tv_setting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/setting"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/orange_light"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context=".ui.activity.SelectActivity">
|
||||
|
||||
<View
|
||||
@ -13,7 +13,7 @@
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
@ -26,30 +26,27 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@color/white"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/svg_back" />
|
||||
android:src="@mipmap/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/select_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -4,7 +4,6 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/orange_light"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.fragment.HomeFragment">
|
||||
|
||||
@ -27,7 +26,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/home_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/orange_light"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.fragment.SettingFragment">
|
||||
|
||||
@ -24,110 +24,93 @@
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_rating"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_rating"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/svg_rating" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_rating"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_link"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/svg_share" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_share"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_rating"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_setKeyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_rating"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/svg_rating" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_setKeyboard"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/png_setting_off" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_rating"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_setKeyboard"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/white33" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_link"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/svg_share" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_share"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/white33" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_layout_setKeyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_img_setKeyboard"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/png_setting_off" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setting_setKeyboard"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -4,26 +4,17 @@
|
||||
android:id="@+id/item_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:backgroundTint="@color/white"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="13dp">
|
||||
|
||||
|
||||
<!-- <androidx.cardview.widget.CardView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="center_horizontal"-->
|
||||
<!-- android:layout_margin="4dp"-->
|
||||
<!-- app:cardCornerRadius="20dp">-->
|
||||
app:cardCornerRadius="6dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_height="160dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/png_item" />
|
||||
|
||||
<ProgressBar
|
||||
@ -34,7 +25,5 @@
|
||||
android:indeterminateTint="@color/orange" />
|
||||
|
||||
|
||||
<!-- </androidx.cardview.widget.CardView>-->
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/item_root"
|
||||
android:layout_width="match_parent"
|
||||
@ -7,47 +7,51 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:backgroundTint="@color/white"
|
||||
app:cardCornerRadius="20dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<ImageView
|
||||
android:id="@+id/item_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="10dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
<ImageView
|
||||
android:id="@+id/item_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/png_item" />
|
||||
android:layout_height="240dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/png_item" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/orange" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/pb"
|
||||
android:indeterminateTint="@color/orange" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/white_card"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/orange"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/view_space"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
44
app/src/main/res/layout/item_key.xml
Normal file
44
app/src/main/res/layout/item_key.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/item_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/orange" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_img"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_selected"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:visibility="gone"
|
||||
android:layout_below="@id/item_img"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/selected" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
app/src/main/res/mipmap-xxxhdpi/icon_back.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/icon_back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 713 B |
@ -6,4 +6,6 @@
|
||||
<color name="orange_light">#FFFED480</color>
|
||||
|
||||
<color name="white33">#55000000</color>
|
||||
<color name="white_card">#80FFFFFF</color>
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
</resources>
|
||||
@ -16,11 +16,13 @@
|
||||
<string name="unEnable">If the keyboard is not enabled, please set it in the settings</string>
|
||||
<string name="succ_apply">Application successful</string>
|
||||
<string name="fail_apply">Application failed, please try again</string>
|
||||
|
||||
<string name="reenter">Download failed, please re-enter this page</string>
|
||||
<string name="slect_key">Please select the following button background</string>
|
||||
|
||||
<string name="delete_res">skin_%s_delete_emoji.png</string>
|
||||
<string name="but_res">skin_%s_style_1_btn.9.png</string>
|
||||
<string name="caps_res">skin_%s_caps_enabled.png</string>
|
||||
<string name="caps_no_res">skin_%s_caps_disabled.png</string>
|
||||
<string name="normal_res">skin_%s_style_1_btn.9.png</string>
|
||||
<string name="normal_res">skin_%s_style_%s_btn.9.png</string>
|
||||
<string name="correct_text_color">skin_%s_style_%s_autocorrect_text_color.png</string>
|
||||
|
||||
</resources>
|
||||
@ -145,7 +145,7 @@
|
||||
android:codes="-4"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right"
|
||||
android:keyLabel="Done" />
|
||||
android:keyLabel="Search" />
|
||||
</Row>
|
||||
|
||||
</Keyboard>
|
||||
@ -141,7 +141,7 @@
|
||||
<!--Done-->
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyLabel="Done"
|
||||
android:keyLabel="Search"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
<!--Done-->
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyLabel="Done"
|
||||
android:keyLabel="Search"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
agp = "7.4.2"
|
||||
agp = "8.0.1"
|
||||
kotlin = "1.9.0"
|
||||
coreKtx = "1.13.1"
|
||||
junit = "4.13.2"
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Fri Jul 12 09:46:22 CST 2024
|
||||
#Tue Jul 23 09:54:02 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@ -17,7 +17,13 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
//Anythink(Core)
|
||||
maven ("https://jfrog.anythinktech.com/artifactory/overseas_sdk")
|
||||
//Mintegral
|
||||
maven ("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||
|
||||
//TopOn集成测试工具
|
||||
maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user