区分是否是搜索按键
This commit is contained in:
parent
e02a7d46f7
commit
ffc9dbea88
@ -28,9 +28,11 @@
|
||||
|
||||
<activity android:name=".ui.activity.MainActivity" />
|
||||
<activity android:name=".ui.activity.SetKeyboardActivity" />
|
||||
<activity android:name=".ui.activity.SelectActivity" />
|
||||
<activity android:name=".ui.activity.ListActivity" />
|
||||
<activity android:name=".ui.activity.DownloadActivity" />
|
||||
|
||||
<activity android:name=".ui.activity.DisplayActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="stateVisible"/>
|
||||
<service
|
||||
android:name=".service.KeyboardService"
|
||||
android:exported="true"
|
||||
|
||||
@ -18,8 +18,9 @@ public interface BackgroundDao {
|
||||
long insertData(BackgroundEntity data);
|
||||
|
||||
|
||||
@Query("select * from keyboard order by id desc")
|
||||
LiveData<List<BackgroundEntity>> queryAll();
|
||||
@Query("select * from keyboard order by RANDOM() LIMIT 1")
|
||||
BackgroundEntity queryRandomItem();
|
||||
|
||||
|
||||
@Query("select * from keyboard where categoryId = :cateId")
|
||||
LiveData<List<BackgroundEntity>> queryCateId(long cateId);
|
||||
|
||||
@ -4,12 +4,16 @@ import android.inputmethodservice.InputMethodService
|
||||
import android.inputmethodservice.Keyboard
|
||||
import android.inputmethodservice.KeyboardView
|
||||
import android.os.SystemClock
|
||||
import android.text.InputType
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ViewInputBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.ZipTools
|
||||
|
||||
|
||||
class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
||||
@ -20,6 +24,10 @@ class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListe
|
||||
private var mouble = false
|
||||
private var laTime = -3L
|
||||
|
||||
private var curImeAction = EditorInfo.IME_ACTION_UNSPECIFIED
|
||||
|
||||
private var imm: InputMethodManager? = null
|
||||
|
||||
private fun keyCase(toBig: Boolean, keyboard: Keyboard) {
|
||||
for (key in keyboard.keys) {
|
||||
if (!key.label.isNullOrEmpty()) {
|
||||
@ -68,15 +76,28 @@ class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListe
|
||||
keyboard = Keyboard(this@KeyboardService, views[0])
|
||||
isEnabled = true
|
||||
}
|
||||
imm = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
||||
override fun onWindowShown() {
|
||||
super.onWindowShown()
|
||||
binding.myCustomInput.upUi(this@KeyboardService)
|
||||
|
||||
|
||||
|
||||
curImeAction = ZipTools.getTextForImeAction(currentInputEditorInfo.imeOptions)
|
||||
|
||||
|
||||
|
||||
|
||||
Log.d(App.TAG, "=======${curImeAction}")
|
||||
|
||||
|
||||
binding.myCustomInput.upUi(this@KeyboardService, curImeAction)
|
||||
}
|
||||
|
||||
|
||||
override fun onPress(primaryCode: Int) {
|
||||
mouble = false
|
||||
if (primaryCode == Keyboard.KEYCODE_SHIFT) {
|
||||
@ -87,6 +108,7 @@ class KeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionListe
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onRelease(primaryCode: Int) {
|
||||
}
|
||||
|
||||
@ -126,12 +148,31 @@ 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)
|
||||
|
||||
currentInputConnection.performEditorAction(curImeAction)
|
||||
when (curImeAction) {
|
||||
EditorInfo.IME_ACTION_NONE -> null
|
||||
EditorInfo.IME_ACTION_GO -> "go"
|
||||
EditorInfo.IME_ACTION_SEARCH -> {
|
||||
// Log.d(App.TAG, "=======IME_ACTION_SEARCH")
|
||||
|
||||
}
|
||||
EditorInfo.IME_ACTION_SEND -> "send"
|
||||
EditorInfo.IME_ACTION_NEXT -> "next"
|
||||
EditorInfo.IME_ACTION_DONE -> {
|
||||
// Log.d(App.TAG, "=======IME_ACTION_DONE")
|
||||
|
||||
}
|
||||
EditorInfo.IME_ACTION_PREVIOUS -> "previous"
|
||||
else -> {
|
||||
// Log.d(App.TAG, "=======IME_ACTION_DONE")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Keyboard.KEYCODE_MODE_CHANGE -> {
|
||||
|
||||
@ -9,7 +9,11 @@ object AppConstant {
|
||||
const val SHARE_NAME = "sp_name"
|
||||
const val SHIFT_NUMBER = -300
|
||||
const val SHIFT_SYMBOL = -301
|
||||
|
||||
//空格键
|
||||
const val KEY_CODE_SPACE = 32
|
||||
|
||||
|
||||
const val KEY_CUR_Skin_Number = "cur_skin_number"
|
||||
const val KEY_CUR_STYLE = "cur_style"
|
||||
const val KEY_CUR_Bg = "cur_bg"
|
||||
@ -48,10 +52,15 @@ object AppConstant {
|
||||
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,style:Int=1) = String.format(App.appContext.getString(R.string.normal_res), id,style)
|
||||
fun getnormalBg(id: String, style: Int = 1) =
|
||||
String.format(App.appContext.getString(R.string.normal_res), id, style)
|
||||
|
||||
//skin_8001_space_arrows_shadows.9
|
||||
fun getSpaceBg(id: String) = String.format(App.appContext.getString(R.string.space_res), id)
|
||||
|
||||
fun getTextColor(id: String,style:Int=1) = String.format(App.appContext.getString(R.string.correct_text_color), id,style)
|
||||
|
||||
fun getEnterIcon(id: String) = String.format(App.appContext.getString(R.string.enter_res), id)
|
||||
|
||||
fun getTextColor(id: String, style: Int = 1) =
|
||||
String.format(App.appContext.getString(R.string.correct_text_color), id, style)
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.tools
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.anythink.debug.util.a
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.DialogRecommendBinding
|
||||
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.DialogStepBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.room.MyDatabase
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.activity.DownloadActivity
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
|
||||
class DialogRecommend(var activity: Activity, var onClose: () -> Unit) : DialogFragment() {
|
||||
|
||||
|
||||
private lateinit var dialogVb: DialogRecommendBinding
|
||||
|
||||
|
||||
private var inputManager: InputMethodManager? = null
|
||||
|
||||
private var data: BackgroundEntity? = null
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
dialogVb = DialogRecommendBinding.inflate(inflater, container, false)
|
||||
init()
|
||||
return dialogVb.root
|
||||
}
|
||||
|
||||
|
||||
private fun init() {
|
||||
isCancelable = false
|
||||
val window = dialog!!.window
|
||||
window!!.setBackgroundDrawableResource(R.color.transparent)
|
||||
window.decorView.setPadding(0, 0, 0, 0)
|
||||
|
||||
initBar(window)
|
||||
|
||||
val wlp = window.attributes
|
||||
wlp.gravity = Gravity.CENTER
|
||||
wlp.width = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
window.attributes = wlp
|
||||
|
||||
dialogVb.close.setOnClickListener {
|
||||
dismiss()
|
||||
|
||||
}
|
||||
dialogVb.imageview.setOnClickListener {
|
||||
|
||||
}
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
data = MyDatabase.myDatabase.BackgroundEntityDao().queryRandomItem()
|
||||
withContext(Dispatchers.Main) {
|
||||
data?.let { backEntity ->
|
||||
Glide
|
||||
.with(App.appContext)
|
||||
.load(backEntity.coverPath)
|
||||
.thumbnail(0.5f)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.into(dialogVb.imageview)
|
||||
|
||||
dialogVb.tvApply.setOnClickListener {
|
||||
val intent = Intent(activity, DownloadActivity::class.java)
|
||||
intent.putExtra(AppConstant.KEY_EXTRA, backEntity)
|
||||
startActivity(intent)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onDismiss(dialog: DialogInterface) {
|
||||
super.onDismiss(dialog)
|
||||
onClose.invoke()
|
||||
}
|
||||
|
||||
|
||||
private fun initBar(window: Window) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
|
||||
window.decorView.systemUiVisibility =
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(activity: Activity, onClose: () -> Unit) =
|
||||
DialogRecommend(activity, onClose)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.tools
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.DialogStepBinding
|
||||
|
||||
|
||||
class DialogStep(var activity: Activity,var onClose:()->Unit) : DialogFragment() {
|
||||
|
||||
|
||||
|
||||
private lateinit var dialogVb: DialogStepBinding
|
||||
|
||||
|
||||
|
||||
private var inputManager: InputMethodManager? = null
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
dialogVb = DialogStepBinding.inflate(inflater, container, false)
|
||||
init()
|
||||
return dialogVb.root
|
||||
}
|
||||
|
||||
|
||||
private fun choseKeyboard() {
|
||||
if (inputManager == null)
|
||||
inputManager = activity.getSystemService(AppCompatActivity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputManager?.showInputMethodPicker()
|
||||
}
|
||||
|
||||
private fun EnableKeyboard() {
|
||||
val intent = Intent(Settings.ACTION_INPUT_METHOD_SETTINGS)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
updateUi()
|
||||
}
|
||||
private fun init() {
|
||||
isCancelable = false
|
||||
val window = dialog!!.window
|
||||
window!!.setBackgroundDrawableResource(R.color.transparent)
|
||||
window.decorView.setPadding(0, 0, 0, 0)
|
||||
|
||||
initBar(window)
|
||||
|
||||
val wlp = window.attributes
|
||||
wlp.gravity = Gravity.BOTTOM
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
window.attributes = wlp
|
||||
|
||||
dialogVb.close.setOnClickListener {
|
||||
dismiss()
|
||||
|
||||
}
|
||||
dialogVb.setKeyboardSteps1.setOnClickListener {
|
||||
EnableKeyboard()
|
||||
}
|
||||
dialogVb.setKeyboardSteps2.setOnClickListener {
|
||||
|
||||
choseKeyboard()
|
||||
}
|
||||
activity.registerReceiver(
|
||||
StepperReceiver(),
|
||||
IntentFilter(Intent.ACTION_INPUT_METHOD_CHANGED)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
inner class StepperReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
updateUi()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onDismiss(dialog: DialogInterface) {
|
||||
super.onDismiss(dialog)
|
||||
onClose.invoke()
|
||||
}
|
||||
|
||||
private fun updateUi() {
|
||||
KeyboardManager.isEnable().let {
|
||||
dialogVb.setKeyboardSteps1.isSelected = it
|
||||
dialogVb.tvSteps1.isSelected = it
|
||||
dialogVb.imOkSteps1.isVisible = it
|
||||
}
|
||||
|
||||
KeyboardManager.isChoose().let {
|
||||
dialogVb.setKeyboardSteps2.isSelected = it
|
||||
dialogVb.tvSteps2.isSelected = it
|
||||
dialogVb.imOkSteps2.isVisible = it
|
||||
}
|
||||
if(KeyboardManager.isChoose()&&KeyboardManager.isEnable()){
|
||||
dismiss()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun initBar(window: Window) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
|
||||
window.decorView.systemUiVisibility =
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(activity: Activity,onClose:()->Unit) = DialogStep(activity,onClose)
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,19 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.tools
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.Log
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.ApplyListener
|
||||
import java.io.BufferedOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
|
||||
object ZipTools {
|
||||
fun unzip(zipFilePath: String?, destDirectory: String, listener: ApplyListener) {
|
||||
var destDir = File(destDirectory)
|
||||
@ -57,4 +60,30 @@ object ZipTools {
|
||||
}
|
||||
|
||||
|
||||
fun loadDrawableFromAsset(fileName: String): Drawable? {
|
||||
val assetManager = App.appContext.assets
|
||||
var input: InputStream? = null
|
||||
return try {
|
||||
input = assetManager.open(fileName)
|
||||
Drawable.createFromStream(input, null)
|
||||
} catch (e: IOException) {
|
||||
Log.e("AssetHelper", "Could not load drawable from asset: $fileName")
|
||||
null
|
||||
} finally {
|
||||
if (input!= null) {
|
||||
try {
|
||||
input.close()
|
||||
} catch (e: IOException) {
|
||||
Log.e(
|
||||
"AssetHelper",
|
||||
"Could not close input stream for asset: $fileName"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fun getTextForImeAction(imeOptions: Int): Int {
|
||||
return imeOptions and EditorInfo.IME_MASK_ACTION
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.ui.activity
|
||||
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityDisplayBinding
|
||||
|
||||
|
||||
class DisplayActivity : BaseActivity() {
|
||||
private lateinit var binding: ActivityDisplayBinding
|
||||
override fun loadAd(): Boolean = true
|
||||
|
||||
private var inputMethod: InputMethodManager? = null
|
||||
|
||||
private var showInput = false
|
||||
|
||||
override fun setRootView(): View {
|
||||
binding = ActivityDisplayBinding.inflate(layoutInflater)
|
||||
init()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
binding.back.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
binding.et.requestFocus()
|
||||
|
||||
inputMethod = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
showInput = true
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (showInput) {
|
||||
showInput = false
|
||||
inputMethod?.showSoftInput(binding.et, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -19,6 +19,7 @@ import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.ActivityDownloadBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.room.MyDatabase
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.DialogStep
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.KeyboardManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.ZipTools
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
@ -46,7 +47,15 @@ class DownloadActivity :
|
||||
|
||||
private lateinit var sp: SharedPreferences
|
||||
|
||||
private var stepDialog: DialogStep? = null
|
||||
|
||||
private var selectedStyle = 1
|
||||
|
||||
private var appliedSkinNumber: String = ""
|
||||
|
||||
private var appliedSkinStyle: Int = -1
|
||||
|
||||
private var defaultStyle = 0
|
||||
override fun loadAd(): Boolean = true
|
||||
override fun setRootView(): View {
|
||||
binding = ActivityDownloadBinding.inflate(layoutInflater)
|
||||
@ -58,6 +67,9 @@ class DownloadActivity :
|
||||
binding.downloadProgress.visibility = View.VISIBLE
|
||||
backgroundEntity = intent.getSerializableExtra(AppConstant.KEY_EXTRA) as BackgroundEntity
|
||||
sp = getSharedPreferences(AppConstant.SHARE_NAME, Context.MODE_PRIVATE)
|
||||
// sp.registerOnSharedPreferenceChangeListener { sharedPreferences, key ->
|
||||
//
|
||||
// }
|
||||
|
||||
initImg()
|
||||
// unzipPath = /data/user/0/com.sunny.tools.app.soft.test/cache/skin_9
|
||||
@ -76,7 +88,6 @@ class DownloadActivity :
|
||||
val zipFile = File(unzipPath)
|
||||
if (!zipFile.exists()) {
|
||||
getZipData(
|
||||
backgroundEntity.skinNumber,
|
||||
backgroundEntity.contentPath,
|
||||
this@DownloadActivity,
|
||||
this
|
||||
@ -99,8 +110,11 @@ class DownloadActivity :
|
||||
}
|
||||
}
|
||||
Log.d(App.TAG, "-------initList=${listOf.size}")
|
||||
val keyAdapter = KeyAdapter(this, listOf) {
|
||||
val keyAdapter = KeyAdapter(this, defaultStyle, listOf) {
|
||||
selectedStyle = it + 1
|
||||
if (appliedSkinNumber == backgroundEntity.skinNumber.toString()) {
|
||||
updateBtn(appliedSkinStyle == selectedStyle)
|
||||
}
|
||||
}
|
||||
binding.listRecycler.run {
|
||||
adapter = keyAdapter
|
||||
@ -125,7 +139,28 @@ class DownloadActivity :
|
||||
binding.imLike.setOnClickListener(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* isApplied 是否已经apply
|
||||
*/
|
||||
private fun updateBtn(isApplied: Boolean) {
|
||||
binding.btnDownload.isSelected = isApplied
|
||||
binding.btnDownload.isEnabled = !isApplied
|
||||
if (isApplied) {
|
||||
binding.btnDownload.text = getString(R.string.applied)
|
||||
} else {
|
||||
binding.btnDownload.text = getString(R.string.apply)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun initImg() {
|
||||
appliedSkinNumber = sp.getString(AppConstant.KEY_CUR_Skin_Number, "") ?: run { "-1" }
|
||||
appliedSkinStyle = sp.getInt(AppConstant.KEY_CUR_STYLE, -1)
|
||||
if (appliedSkinNumber == backgroundEntity.skinNumber.toString()) {
|
||||
updateBtn(appliedSkinStyle == selectedStyle)
|
||||
}else{
|
||||
updateBtn(false)
|
||||
}
|
||||
binding.imLike.isSelected = backgroundEntity.like
|
||||
try {
|
||||
Glide
|
||||
@ -161,15 +196,20 @@ class DownloadActivity :
|
||||
MyDatabase.myDatabase.BackgroundEntityDao().updateCollect(backgroundEntity.apply {
|
||||
like = binding.imLike.isSelected
|
||||
})
|
||||
Log.d(App.TAG, "-------updateCollect= ${backgroundEntity.skinNumber} ${binding.imLike.isSelected}")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun applySkin() {
|
||||
if (!KeyboardManager.isChoose() || !KeyboardManager.isEnable()) {
|
||||
Toast.makeText(this, getString(R.string.unEnable), Toast.LENGTH_SHORT).show()
|
||||
val intent = Intent(this, SetKeyboardActivity::class.java)
|
||||
startActivity(intent)
|
||||
if (stepDialog == null) {
|
||||
stepDialog = DialogStep.newInstance(this@DownloadActivity) {
|
||||
if (KeyboardManager.isChoose() && KeyboardManager.isEnable()) {
|
||||
onShowAd()
|
||||
}
|
||||
}
|
||||
}
|
||||
stepDialog?.show(supportFragmentManager, "")
|
||||
return
|
||||
}
|
||||
onShowAd()
|
||||
@ -190,14 +230,17 @@ class DownloadActivity :
|
||||
putInt(AppConstant.KEY_CUR_STYLE, selectedStyle)
|
||||
putString(AppConstant.KEY_CUR_Bg, backgroundEntity.coverPath)
|
||||
apply()
|
||||
Log.d(App.TAG, "------putConfig ----skin_Number = ${ backgroundEntity.skinNumber} style=${selectedStyle} ")
|
||||
}
|
||||
|
||||
binding.downloadProgress.visibility = View.GONE
|
||||
Toast.makeText(this, getString(R.string.succ_apply), Toast.LENGTH_LONG).show()
|
||||
startActivity(Intent(this@DownloadActivity, DisplayActivity::class.java))
|
||||
finish()
|
||||
|
||||
}
|
||||
|
||||
private fun getZipData(
|
||||
skinNumber: Int,
|
||||
contentPath: String,
|
||||
context: Context,
|
||||
listener: ApplyListener
|
||||
|
||||
@ -13,7 +13,7 @@ import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.SelectAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnBgItemClickListener
|
||||
|
||||
class SelectActivity : BaseActivity(), View.OnClickListener {
|
||||
class ListActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private lateinit var binding: ActivitySelectBinding
|
||||
private lateinit var categoryEntity: CategoryEntity
|
||||
@ -34,7 +34,7 @@ class SelectActivity : BaseActivity(), View.OnClickListener {
|
||||
val selectAdapter =
|
||||
SelectAdapter(this, object : OnBgItemClickListener {
|
||||
override fun onItemClick(position: Int, backgroundEntity: BackgroundEntity) {
|
||||
val intent = Intent(this@SelectActivity, DownloadActivity::class.java)
|
||||
val intent = Intent(this@ListActivity, DownloadActivity::class.java)
|
||||
intent.putExtra(AppConstant.KEY_EXTRA, backgroundEntity)
|
||||
startActivity(intent)
|
||||
Log.e("TAG", "onItemClick: $backgroundEntity")
|
||||
@ -47,7 +47,7 @@ class SelectActivity : BaseActivity(), View.OnClickListener {
|
||||
}
|
||||
|
||||
binding.selectRecyclerView.apply {
|
||||
layoutManager = GridLayoutManager(this@SelectActivity, 1)
|
||||
layoutManager = GridLayoutManager(this@ListActivity, 1)
|
||||
adapter = selectAdapter
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,16 @@
|
||||
package com.sunny.app.soft.timberkeyboardnew.ui.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.provider.Settings
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
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.tools.DialogRecommend
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.DialogStep
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.KeyboardManager
|
||||
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.CollectFragment
|
||||
@ -18,6 +24,11 @@ class MainActivity :
|
||||
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var fragmentList: MutableList<Fragment>
|
||||
|
||||
|
||||
private var stepDialog: DialogStep? = null
|
||||
|
||||
private var recommendDialog: DialogRecommend? = null
|
||||
override fun loadAd(): Boolean = true
|
||||
|
||||
override fun setRootView(): View {
|
||||
@ -29,6 +40,7 @@ class MainActivity :
|
||||
super.initView()
|
||||
initViewPager()
|
||||
initTabButton()
|
||||
checkStep()
|
||||
}
|
||||
|
||||
private fun initTabButton() {
|
||||
@ -37,6 +49,31 @@ class MainActivity :
|
||||
binding.mainTabCollect.setOnClickListener(this)
|
||||
}
|
||||
|
||||
|
||||
private fun checkStep() {
|
||||
if (!KeyboardManager.isEnable() || !KeyboardManager.isChoose()) {
|
||||
if (stepDialog == null) {
|
||||
stepDialog = DialogStep.newInstance(this@MainActivity) {
|
||||
showRecommend()
|
||||
}
|
||||
}
|
||||
stepDialog?.show(supportFragmentManager, "")
|
||||
} else {
|
||||
showRecommend()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun showRecommend() {
|
||||
if (recommendDialog == null) {
|
||||
recommendDialog = DialogRecommend.newInstance(this@MainActivity) {
|
||||
|
||||
}
|
||||
}
|
||||
recommendDialog?.show(supportFragmentManager, "")
|
||||
}
|
||||
|
||||
|
||||
private fun initViewPager() {
|
||||
fragmentList = mutableListOf()
|
||||
fragmentList.add(HomeFragment())
|
||||
@ -80,9 +117,11 @@ class MainActivity :
|
||||
binding.mainTabHome -> {
|
||||
setTabSelect(0)
|
||||
}
|
||||
|
||||
binding.mainTabCollect -> {
|
||||
setTabSelect(1)
|
||||
}
|
||||
|
||||
binding.mainTabSet -> {
|
||||
setTabSelect(2)
|
||||
}
|
||||
|
||||
@ -52,19 +52,19 @@ class SetKeyboardActivity :
|
||||
}
|
||||
|
||||
private fun updateUi() {
|
||||
if (KeyboardManager.isEnable()) {
|
||||
binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_grey)
|
||||
} else {
|
||||
binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_orange)
|
||||
}
|
||||
if (KeyboardManager.isChoose()) {
|
||||
binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_grey)
|
||||
} else {
|
||||
binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_orange)
|
||||
}
|
||||
if (KeyboardManager.isChoose() && KeyboardManager.isEnable()) {
|
||||
showInfoDialog()
|
||||
}
|
||||
// if (KeyboardManager.isEnable()) {
|
||||
// binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_grey)
|
||||
// } else {
|
||||
// binding.setKeyboardSteps1.setBackgroundResource(R.drawable.shape_r24_orange)
|
||||
// }
|
||||
// if (KeyboardManager.isChoose()) {
|
||||
// binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_grey)
|
||||
// } else {
|
||||
// binding.setKeyboardSteps2.setBackgroundResource(R.drawable.shape_r24_orange)
|
||||
// }
|
||||
// if (KeyboardManager.isChoose() && KeyboardManager.isEnable()) {
|
||||
// showInfoDialog()
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -21,11 +21,13 @@ import com.sunny.app.soft.timberkeyboardnew.R
|
||||
|
||||
class KeyAdapter(
|
||||
private val context: Context,
|
||||
private var selectedPos: Int = 0,
|
||||
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) {
|
||||
|
||||
|
||||
@ -6,21 +6,16 @@ import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.DataManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.BackgroundEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentCollectBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentHomeBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.room.MyDatabase
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
import com.sunny.app.soft.timberkeyboardnew.topon.AdManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.activity.DownloadActivity
|
||||
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.activity.ListActivity
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.SelectAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnBgItemClickListener
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnItemClickListener
|
||||
|
||||
class CollectFragment :
|
||||
BaseFragment() {
|
||||
@ -70,7 +65,7 @@ class CollectFragment :
|
||||
}
|
||||
|
||||
private fun enterList() {
|
||||
val intent = Intent(requireContext(), SelectActivity::class.java)
|
||||
val intent = Intent(requireContext(), ListActivity::class.java)
|
||||
intent.putExtra(AppConstant.KEY_EXTRA, data)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
@ -6,13 +6,12 @@ import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.DataManager
|
||||
import com.sunny.app.soft.timberkeyboardnew.data.entity.CategoryEntity
|
||||
import com.sunny.app.soft.timberkeyboardnew.databinding.FragmentHomeBinding
|
||||
import com.sunny.app.soft.timberkeyboardnew.room.MyDatabase
|
||||
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.activity.ListActivity
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.adapter.HomeViewAdapter
|
||||
import com.sunny.app.soft.timberkeyboardnew.ui.listener.OnItemClickListener
|
||||
|
||||
@ -58,7 +57,7 @@ class HomeFragment :
|
||||
}
|
||||
|
||||
private fun enterList() {
|
||||
val intent = Intent(requireContext(), SelectActivity::class.java)
|
||||
val intent = Intent(requireContext(), ListActivity::class.java)
|
||||
intent.putExtra(AppConstant.KEY_EXTRA, data)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
@ -41,11 +41,7 @@ class SettingFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
|
||||
binding.settingLayoutSetKeyboard -> {
|
||||
val intent = Intent(
|
||||
requireContext(),
|
||||
SetKeyboardActivity::class.java
|
||||
)
|
||||
startActivity(intent)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,12 +15,8 @@ import android.inputmethodservice.Keyboard
|
||||
import android.inputmethodservice.KeyboardView
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.core.content.ContextCompat
|
||||
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.sunny.app.soft.timberkeyboardnew.App
|
||||
import com.sunny.app.soft.timberkeyboardnew.R
|
||||
import com.sunny.app.soft.timberkeyboardnew.tools.AppConstant
|
||||
@ -35,6 +31,9 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
style: Int = 0
|
||||
) : KeyboardView(myContext, attributeSet, style) {
|
||||
|
||||
private var curimeAction = EditorInfo.IME_ACTION_UNSPECIFIED
|
||||
|
||||
|
||||
inner class MyConfig {
|
||||
lateinit var functionBackgroundDraw: Drawable
|
||||
lateinit var spBackgroundDraw: Drawable
|
||||
@ -50,6 +49,12 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
var icSshift: Drawable? =
|
||||
ContextCompat.getDrawable(context, R.drawable.svg_shift)
|
||||
|
||||
var icEnter: Drawable? =
|
||||
ContextCompat.getDrawable(context, R.drawable.key_ic_enter)
|
||||
|
||||
var icSearch: Drawable? =
|
||||
ContextCompat.getDrawable(context, R.drawable.key_ic_search)
|
||||
|
||||
var keycolor: Int = context.resources.getColor(R.color.white33, null)
|
||||
|
||||
private val sp: SharedPreferences = context.getSharedPreferences(
|
||||
@ -84,6 +89,7 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
val default =
|
||||
ContextCompat.getDrawable(context, R.drawable.png_keybg)
|
||||
@ -105,7 +111,7 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
sp.getString(AppConstant.KEY_CUR_Skin_Number, "")?.let { skin_Number ->
|
||||
val unzipPath = ZipTools.getUnzipPath(skin_Number) + "/"
|
||||
val style = sp.getInt(AppConstant.KEY_CUR_STYLE, 1)
|
||||
Log.d(App.TAG,"------update="+ unzipPath.plus(AppConstant.getnormalBg(skin_Number,style)))
|
||||
Log.d(App.TAG, "------updateConfig----skin_Number = $skin_Number style=${style} ")
|
||||
|
||||
gettextcolornew(unzipPath.plus(AppConstant.getTextColor(skin_Number, style)))
|
||||
|
||||
@ -120,29 +126,13 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
sp.getString(AppConstant.KEY_CUR_Bg, "")?.run {
|
||||
Glide.with(App.appContext).asDrawable().load(this).listener(object :RequestListener<Drawable>{
|
||||
override fun onLoadFailed(
|
||||
e: GlideException?,
|
||||
model: Any?,
|
||||
target: Target<Drawable>,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
return false
|
||||
//file:///android_asset/Abstract/photo_24055_89_44_1654593252.png
|
||||
val replace = this.replace("file:///android_asset/", "")
|
||||
val loadDrawableFromAsset = ZipTools.loadDrawableFromAsset(replace)
|
||||
loadDrawableFromAsset?.let {
|
||||
allBg = it
|
||||
Log.d(App.TAG, "------updateConfig----allBg ")
|
||||
}
|
||||
|
||||
override fun onResourceReady(
|
||||
resource: Drawable,
|
||||
model: Any,
|
||||
target: Target<Drawable>?,
|
||||
dataSource: DataSource,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
allBg = resource
|
||||
return false
|
||||
}
|
||||
|
||||
}).preload()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +146,6 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ok
|
||||
getbgic(con, unzipPath.plus(AppConstant.getCaps(skin_Number)))?.let {
|
||||
icSshift = it
|
||||
@ -176,6 +165,10 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
icShittLock = it
|
||||
}
|
||||
|
||||
getbgic(con, unzipPath.plus(AppConstant.getEnterIcon(skin_Number)))?.let {
|
||||
icEnter = it
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,6 +189,7 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
myKey: Keyboard.Key,
|
||||
keyBG: Drawable,
|
||||
icon: Drawable?,
|
||||
customerLabel: String? = null,
|
||||
canvas: Canvas,
|
||||
) {
|
||||
myKey.run {
|
||||
@ -250,13 +244,21 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
myPaint.color = config.keycolor
|
||||
if (!label.isNullOrEmpty()) {
|
||||
|
||||
val y1 = y.plus(paddingRight).plus((height.div(2f)))
|
||||
.plus((myPaint.textSize.minus(myPaint.descent())).div(2f))
|
||||
val x1 = x.plus(paddingLeft).plus((width.div(2f)))
|
||||
customerLabel?.let {
|
||||
myPaint.textSize = myContext.resources.displayMetrics.scaledDensity * 13f
|
||||
canvas.drawText(it, x1, y1, myPaint)
|
||||
}.run {
|
||||
if (!label.isNullOrEmpty()) {
|
||||
myPaint.textSize = myContext.resources.displayMetrics.scaledDensity * 16f
|
||||
canvas.drawText(label.toString(), x1, y1, myPaint)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCurIc(): Drawable? {
|
||||
@ -270,6 +272,7 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
keyboard.keys.forEach {
|
||||
when (it.codes[0]) {
|
||||
Keyboard.KEYCODE_SHIFT -> {
|
||||
@ -277,45 +280,86 @@ class MyKeyboardView @JvmOverloads constructor(
|
||||
it,
|
||||
config.functionBackgroundDraw,
|
||||
getCurIc(),
|
||||
null,
|
||||
canvas
|
||||
)
|
||||
}
|
||||
|
||||
AppConstant.SHIFT_NUMBER, AppConstant.SHIFT_SYMBOL -> {
|
||||
andDraw(it, config.functionBackgroundDraw, null, canvas)
|
||||
andDraw(it, config.functionBackgroundDraw, null,null, canvas)
|
||||
}
|
||||
|
||||
Keyboard.KEYCODE_DELETE -> {
|
||||
andDraw(
|
||||
it,
|
||||
config.functionBackgroundDraw,
|
||||
config.icDel,
|
||||
config.icDel,null,
|
||||
canvas
|
||||
)
|
||||
}
|
||||
|
||||
Keyboard.KEYCODE_MODE_CHANGE, Keyboard.KEYCODE_DONE -> {
|
||||
Keyboard.KEYCODE_MODE_CHANGE -> {
|
||||
andDraw(
|
||||
it,
|
||||
config.functionBackgroundDraw,
|
||||
null,
|
||||
null,null,
|
||||
canvas
|
||||
)
|
||||
}
|
||||
|
||||
AppConstant.KEY_CODE_SPACE -> {
|
||||
andDraw(it, config.spBackgroundDraw, null, canvas)
|
||||
andDraw(it, config.spBackgroundDraw, null,null, canvas)
|
||||
}
|
||||
|
||||
Keyboard.KEYCODE_DONE -> {
|
||||
when (curimeAction) {
|
||||
// EditorInfo.IME_ACTION_NONE -> {
|
||||
// Log.d(App.TAG, "=======NONE")
|
||||
// andDraw(it, config.functionBackgroundDraw, config.icEnter,null, canvas)
|
||||
// }
|
||||
// EditorInfo.IME_ACTION_GO -> {
|
||||
//
|
||||
// Log.d(App.TAG, "=======go")
|
||||
// andDraw(it, config.functionBackgroundDraw,null,"Go", canvas)
|
||||
// }
|
||||
EditorInfo.IME_ACTION_SEARCH -> {
|
||||
Log.d(App.TAG, "=======SEARCH")
|
||||
andDraw(it, config.functionBackgroundDraw, null,"Search", canvas)
|
||||
}
|
||||
// EditorInfo.IME_ACTION_SEND -> {
|
||||
// Log.d(App.TAG, "=======SEND")
|
||||
// andDraw(it, config.functionBackgroundDraw,null,"Send", canvas)
|
||||
// }
|
||||
// EditorInfo.IME_ACTION_NEXT -> {
|
||||
// Log.d(App.TAG, "=======NEXT")
|
||||
// andDraw(it, config.functionBackgroundDraw,null,"Next", canvas)
|
||||
// }
|
||||
// EditorInfo.IME_ACTION_DONE -> {
|
||||
// Log.d(App.TAG, "=======DONE")
|
||||
// andDraw(it, config.functionBackgroundDraw,null,"Done", canvas)
|
||||
// }
|
||||
// EditorInfo.IME_ACTION_PREVIOUS -> {
|
||||
// Log.d(App.TAG, "=======PREVIOUS")
|
||||
// andDraw(it, config.functionBackgroundDraw,null,"Previous", canvas)
|
||||
// }
|
||||
else -> {
|
||||
Log.d(App.TAG, "=======else")
|
||||
andDraw(it, config.functionBackgroundDraw,null,"Done", canvas)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else -> {
|
||||
andDraw(it, config.normalBackgroundDraw, null, canvas)
|
||||
andDraw(it, config.normalBackgroundDraw, null, null,canvas)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun upUi(con: Context) {
|
||||
fun upUi(con: Context, ime: Int) {
|
||||
curimeAction = ime
|
||||
config.updateConfig(con)
|
||||
background = config.allBg
|
||||
invalidate()
|
||||
|
||||
6
app/src/main/res/color/step_text_color.xml
Normal file
6
app/src/main/res/color/step_text_color.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:color="@color/text_color" android:state_selected="true"/>
|
||||
<item android:color="@color/white" android:state_selected="false"/>
|
||||
</selector>
|
||||
8
app/src/main/res/drawable/bg_edittext.xml
Normal file
8
app/src/main/res/drawable/bg_edittext.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<stroke android:color="@color/end_color" android:width="1dp"/>
|
||||
<solid android:color="@color/et_color"/>
|
||||
|
||||
</shape>
|
||||
14
app/src/main/res/drawable/dialog_close.xml
Normal file
14
app/src/main/res/drawable/dialog_close.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:strokeWidth="1"
|
||||
android:pathData="M12,0.5L12,0.5A11.5,11.5 0,0 1,23.5 12L23.5,12A11.5,11.5 0,0 1,12 23.5L12,23.5A11.5,11.5 0,0 1,0.5 12L0.5,12A11.5,11.5 0,0 1,12 0.5z"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M16.496,8.511C16.774,8.233 16.774,7.782 16.496,7.504C16.218,7.225 15.767,7.225 15.489,7.504L12,10.993L8.511,7.504C8.233,7.225 7.782,7.225 7.504,7.504C7.225,7.782 7.225,8.233 7.504,8.511L10.993,12L7.504,15.489C7.225,15.767 7.225,16.218 7.504,16.496C7.782,16.774 8.233,16.774 8.511,16.496L12,13.007L15.489,16.496C15.767,16.774 16.218,16.774 16.496,16.496C16.774,16.218 16.774,15.767 16.496,15.489L13.007,12L16.496,8.511Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/key_ic_enter.xml
Normal file
9
app/src/main/res/drawable/key_ic_enter.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="14dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M810.7,213.3a42.7,42.7 0,0 1,42.4 37.7L853.3,256v274.3c0,79.3 -50.9,147.5 -120.5,152.1L725.3,682.7H273.7l97.8,97.8a42.7,42.7 0,0 1,-56.3 63.9l-4,-3.5 -170.7,-170.7a42.7,42.7 0,0 1,0 -60.3l170.7,-170.7a42.7,42.7 0,0 1,63.9 56.3l-3.5,4L273.7,597.3H725.3c19.6,0 39.9,-24.6 42.4,-59.9l0.3,-7.2V256a42.7,42.7 0,0 1,42.7 -42.7z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/key_ic_search.xml
Normal file
12
app/src/main/res/drawable/key_ic_search.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="14dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M431.6,791c-209.4,0 -379.9,-170.5 -379.9,-379.9 0,-209.4 170.5,-379.9 379.9,-379.9s379.9,170.5 379.9,379.9c0,209.4 -170.5,379.9 -379.9,379.9zM431.6,97.8c-172.5,0 -313.3,140.3 -313.3,313.3 0,172.5 140.3,313.3 313.3,313.3 172.5,0 313.3,-140.3 313.3,-313.3 0,-172.5 -140.8,-313.3 -313.3,-313.3z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M676.9,660.5l278.5,278.5c12.8,12.8 12.8,34.3 0,47.1 -12.8,12.8 -34.3,12.8 -47.1,0L629.8,707.6c-12.8,-12.8 -12.8,-34.3 0,-47.1 12.8,-12.8 34.3,-12.8 47.1,0z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/selector_step.xml
Normal file
7
app/src/main/res/drawable/selector_step.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/shape_12dp_step_true" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/shape_12dp_step" android:state_selected="false" />
|
||||
|
||||
</selector>
|
||||
9
app/src/main/res/drawable/shape_12dp_step.xml
Normal file
9
app/src/main/res/drawable/shape_12dp_step.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:endColor="@color/end_color"
|
||||
android:startColor="@color/start_color" />
|
||||
<corners android:radius="12dp" />
|
||||
|
||||
</shape>
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#7E7E7E"/>
|
||||
<corners android:radius="24dp"/>
|
||||
<solid android:color="@color/step_ok" />
|
||||
<corners android:radius="12dp" />
|
||||
|
||||
</shape>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/orange" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/orange" />
|
||||
<corners android:radius="24dp" />
|
||||
|
||||
</shape>
|
||||
16
app/src/main/res/drawable/step_ok.xml
Normal file
16
app/src/main/res/drawable/step_ok.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="17">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0.605h16v16h-16z"/>
|
||||
<path
|
||||
android:pathData="M4.641,8.509C4.348,8.217 3.873,8.217 3.581,8.509C3.288,8.802 3.288,9.276 3.581,9.568L6.665,12.648C6.811,12.794 7.003,12.868 7.195,12.868C7.387,12.868 7.579,12.794 7.725,12.648L14.781,5.602C15.073,5.31 15.073,4.836 14.781,4.544C14.488,4.251 14.013,4.251 13.72,4.544L7.195,11.061L4.641,8.509Z"
|
||||
android:fillColor="#40C345"/>
|
||||
<path
|
||||
android:pathData="M15.94,7.776C15.907,7.463 15.627,7.235 15.313,7.267C15,7.3 14.772,7.58 14.804,7.893C14.828,8.128 14.841,8.367 14.841,8.606C14.841,12.377 11.768,15.446 7.991,15.446C4.214,15.446 1.142,12.377 1.142,8.606C1.142,4.834 4.214,1.765 7.991,1.765C9.339,1.765 10.642,2.155 11.761,2.894C12.025,3.067 12.379,2.995 12.552,2.732C12.726,2.469 12.654,2.116 12.391,1.942C11.085,1.081 9.563,0.625 7.991,0.625C3.585,0.625 0,4.205 0,8.606C0,13.006 3.585,16.586 7.991,16.586C12.397,16.586 15.982,13.006 15.982,8.606C15.982,8.328 15.968,8.049 15.94,7.776Z"
|
||||
android:fillColor="#000000"/>
|
||||
</group>
|
||||
</vector>
|
||||
52
app/src/main/res/layout/activity_display.xml
Normal file
52
app/src/main/res/layout/activity_display.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_display"
|
||||
tools:context=".ui.activity.DisplayActivity">
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/view"
|
||||
android:layout_marginStart="8dp"
|
||||
android:padding="8dp"
|
||||
android:src="@mipmap/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/back"
|
||||
android:layout_alignBottom="@id/back"
|
||||
android:layout_toEndOf="@id/back"
|
||||
android:gravity="center"
|
||||
android:text="@string/display"
|
||||
android:id="@+id/tv"
|
||||
android:textColor="@color/text_color"
|
||||
android:textSize="19sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_below="@id/back"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:hint="@string/display_et"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textSize="14sp"
|
||||
android:paddingStart="12dp"
|
||||
android:textColorHint="@color/hint_text_color"
|
||||
android:textColor="@color/hint_text_color"
|
||||
android:background="@drawable/bg_edittext"
|
||||
android:padding="2dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -11,7 +11,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.SelectActivity">
|
||||
tools:context=".ui.activity.ListActivity">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@ -102,11 +102,11 @@
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:background="@drawable/selector_step"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
android:text="@string/apply"
|
||||
android:textColor="@color/step_text_color"
|
||||
android:textSize="19sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -63,11 +63,11 @@
|
||||
<TextView
|
||||
android:id="@+id/setKeyboard_steps1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:background="@drawable/selector_step"
|
||||
android:gravity="center"
|
||||
android:text="@string/setKeyboard_steps1"
|
||||
android:textColor="@color/white"
|
||||
@ -76,11 +76,11 @@
|
||||
<TextView
|
||||
android:id="@+id/setKeyboard_steps2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:background="@drawable/shape_r20_white"
|
||||
android:background="@drawable/selector_step"
|
||||
android:gravity="center"
|
||||
android:text="@string/setKeyboard_steps2"
|
||||
android:textColor="@color/white"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context=".ui.activity.SelectActivity">
|
||||
tools:context=".ui.activity.ListActivity">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
||||
52
app/src/main/res/layout/dialog_recommend.xml
Normal file
52
app/src/main/res/layout/dialog_recommend.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_alignEnd="@id/bg"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/dialog_close" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="332dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@mipmap/bg_recommend"
|
||||
android:padding="27dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="167dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="38dp"
|
||||
android:layout_below="@id/bg"
|
||||
android:id="@+id/tv_apply"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="21dp"
|
||||
android:background="@mipmap/bg_recommend_btn"
|
||||
android:gravity="center"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="25dp"
|
||||
android:text="@string/apply_now"
|
||||
android:textColor="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
114
app/src/main/res/layout/dialog_step.xml
Normal file
114
app/src/main/res/layout/dialog_step.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?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="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/dialog_close" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/bell"
|
||||
android:layout_marginTop="-55dp"
|
||||
android:background="@mipmap/dialog_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="65dp"
|
||||
android:text="@string/active_keyboard"
|
||||
android:textColor="@color/text_color"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setKeyboard_steps1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:background="@drawable/selector_step"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_steps1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setKeyboard_steps1"
|
||||
android:textColor="@color/step_text_color"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_ok_steps1"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/step_ok" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setKeyboard_steps2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/selector_step"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_steps2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setKeyboard_steps2"
|
||||
android:textColor="@color/step_text_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_ok_steps2"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/step_ok" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bell"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="93dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@mipmap/im_bell" />
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
BIN
app/src/main/res/mipmap-xxxhdpi/bg_display.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/bg_display.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
BIN
app/src/main/res/mipmap-xxxhdpi/bg_recommend.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/bg_recommend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/bg_recommend_btn.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/bg_recommend_btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/dialog_bg.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/dialog_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 261 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/im_bell.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/im_bell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 149 KiB |
@ -11,4 +11,10 @@
|
||||
<color name="white_card">#80FFFFFF</color>
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
<color name="color_00">#000000</color>
|
||||
<color name="text_color">#333333</color>
|
||||
<color name="start_color">#FFAE65</color>
|
||||
<color name="end_color">#FC6409</color>
|
||||
<color name="step_ok">#F7F9FC</color>
|
||||
<color name="et_color">#FFF3E3</color>
|
||||
<color name="hint_text_color">#F7931A</color>
|
||||
</resources>
|
||||
@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
<string name="app_name">Custom Keyboard</string>
|
||||
|
||||
<string name="active_keyboard">Activate Custom Keyboard</string>
|
||||
<string name="home">Home</string>
|
||||
<string name="setting">Setting</string>
|
||||
<string name="Collection">Collection</string>
|
||||
@ -10,20 +10,25 @@
|
||||
<string name="link">https://play.google.com/store/apps/details?id=</string>
|
||||
<string name="enable">Enable Keyboard</string>
|
||||
<string name="setKeyboard_text">Please follow the steps below to enable the keyboard theme of your choice!</string>
|
||||
<string name="setKeyboard_steps1">Step 1: Select Keyboard</string>
|
||||
<string name="setKeyboard_steps2">Step 2: Enable Keyboard</string>
|
||||
<string name="download">Download and Setting</string>
|
||||
<string name="setKeyboard_steps1">Step 1: Select</string>
|
||||
<string name="setKeyboard_steps2">Step 2: Enable</string>
|
||||
<string name="apply">Apply</string>
|
||||
<string name="applied">Applied</string>
|
||||
<string name="apply_now">Apply Now</string>
|
||||
<string name="download_title">Set this skin</string>
|
||||
<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="display">Display</string>
|
||||
<string name="display_et">Enter text to see the effect</string>
|
||||
|
||||
<string name="delete_res">skin_%s_delete_emoji.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_%s_btn.9.png</string>
|
||||
<string name="enter_res">skin_%s_enter_ic.png</string>
|
||||
<string name="space_res">skin_%s_space_arrows_shadows.9.png</string>
|
||||
<string name="correct_text_color">skin_%s_style_%s_autocorrect_text_color.png</string>
|
||||
<string name="empty_love">No data yet. Come add your favorite keyboard skins.</string>
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.TimberKeyboardNew" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
<item name="colorPrimary">@color/white</item>
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.TimberKeyboardNew" parent="Base.Theme.TimberKeyboardNew" />
|
||||
|
||||
@ -144,8 +144,7 @@
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right"
|
||||
android:keyLabel="Search" />
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
</Keyboard>
|
||||
@ -141,7 +141,7 @@
|
||||
<!--Done-->
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyLabel="Search"
|
||||
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
<!--Done-->
|
||||
<Key
|
||||
android:codes="-4"
|
||||
android:keyLabel="Search"
|
||||
|
||||
android:keyWidth="14.25%"
|
||||
android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user