优化1
This commit is contained in:
@@ -12,6 +12,7 @@ import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.example.myapplication.network.BehaviorReporter
|
||||
|
||||
class ImeGuideActivity : AppCompatActivity() {
|
||||
|
||||
@@ -33,6 +34,11 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_ime_guide)
|
||||
|
||||
BehaviorReporter.report(
|
||||
isNewUser = false,
|
||||
"page_id" to "keyboard_permission_guide",
|
||||
)
|
||||
|
||||
Log.d(TAG, "onCreate")
|
||||
|
||||
btnEnable = findViewById(R.id.enabled) // btn启用输入法
|
||||
@@ -69,6 +75,15 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
BehaviorReporter.report(
|
||||
isNewUser = false,
|
||||
"page_id" to "keyboard_permission_guide",
|
||||
"element_id" to "close_btn",
|
||||
)
|
||||
super.onBackPressed()
|
||||
}
|
||||
|
||||
private fun registerImeObserver() {
|
||||
if (imeObserver != null) return
|
||||
|
||||
@@ -153,6 +168,11 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
selectLayout.setOnClickListener {
|
||||
val imm = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.showInputMethodPicker()
|
||||
BehaviorReporter.report(
|
||||
isNewUser = false,
|
||||
"page_id" to "keyboard_permission_guide",
|
||||
"element_id" to "open_settings_btn",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,6 +212,11 @@ class ImeGuideActivity : AppCompatActivity() {
|
||||
selectText.setTextColor(Color.parseColor("#A1A1A1"))
|
||||
step1.text = "Completed"
|
||||
step2.text = "You have completed the relevant Settings"
|
||||
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()
|
||||
try {
|
||||
startActivity(Intent(this, GuideActivity::class.java))
|
||||
|
||||
Reference in New Issue
Block a user