国际化
This commit is contained in:
@@ -145,7 +145,6 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
enableText == null || selectText == null ||
|
||||
enableImg == null || selectImg == null
|
||||
) {
|
||||
Log.e(TAG, "有 View 为 null,检查 activity_ime_guide.xml 的 id 是否匹配")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -178,22 +177,24 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
|
||||
if (!enabled && !selected) {
|
||||
enableLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_unfinished)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_unfinished)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_completed)
|
||||
enableText.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
selectText.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
selectText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
enableImg.setImageResource(R.drawable.ime_guide_activity_btn_unfinished_img)
|
||||
selectImg.setImageResource(R.drawable.ime_guide_activity_btn_unfinished_img)
|
||||
step1.text = "Step one"
|
||||
step2.text = "Check to enable key of love"
|
||||
step1.text = getString(R.string.imguide_text1_step1)
|
||||
step2.text = getString(R.string.imguide_text2_step1)
|
||||
selectLayout.setOnClickListener(null)
|
||||
} else if (!enabled && selected) {
|
||||
enableLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_unfinished)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_unfinished)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_completed)
|
||||
enableImg.setImageResource(R.drawable.ime_guide_activity_btn_unfinished_img)
|
||||
selectImg.setImageResource(R.drawable.ime_guide_activity_btn_unfinished_img)
|
||||
enableText.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
selectText.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
step1.text = "Step one"
|
||||
step2.text = "Check to enable key of love"
|
||||
selectText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
step1.text = getString(R.string.imguide_text1_step1)
|
||||
step2.text = getString(R.string.imguide_text2_step1)
|
||||
selectLayout.setOnClickListener(null)
|
||||
} else if (enabled && !selected) {
|
||||
enableLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_completed)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_unfinished)
|
||||
@@ -201,8 +202,8 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
selectImg.setImageResource(R.drawable.ime_guide_activity_btn_unfinished_img)
|
||||
enableText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
selectText.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
step1.text = "Step two"
|
||||
step2.text = "Select key of love as your default input method"
|
||||
step1.text =getString(R.string.imguide_text1_step2)
|
||||
step2.text = getString(R.string.imguide_text2_step2)
|
||||
} else if (enabled && selected) {
|
||||
enableLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_completed)
|
||||
selectLayout.background = getDrawable(R.drawable.ime_guide_activity_btn_completed)
|
||||
@@ -210,14 +211,14 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
selectImg.setImageResource(R.drawable.ime_guide_activity_btn_completed_img)
|
||||
enableText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
selectText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
step1.text = "Completed"
|
||||
step2.text = "You have completed the relevant Settings"
|
||||
step1.text =getString(R.string.imguide_text1_step3)
|
||||
step2.text = getString(R.string.imguide_text2_step3)
|
||||
BehaviorReporter.report(
|
||||
isNewUser = false,
|
||||
"page_id" to "keyboard_permission_guide",
|
||||
"element_id" to "close_btn",
|
||||
)
|
||||
Toast.makeText(this, "The input method is all set!", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(this, getString(R.string.imguide_text2_step3_hint), Toast.LENGTH_SHORT).show()
|
||||
try {
|
||||
startActivity(Intent(this, GuideActivity::class.java))
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user