Issue
In Kotlin I put 2 intent lines under the bottom. but the second intent does not open before the first one is opened. I am having the same problem when adding audio. There are 10 different sounds. The 2nd voice cannot be turned on unless the 1st voice is turned on, and the 3rd voice cannot be turned on unless the 2nd is turned on. Can anyone help who knows why this is happening?intent sequence image
val button = findViewById<ImageButton>(R.id.bt1)
button.setOnClickListener {
val intent = Intent(this, aykutelmas::class.java)
startActivity(intent)
val button1 = findViewById<ImageButton>(R.id.bt2)
button1.setOnClickListener {
val intent1 = Intent(this, deepturkish::class.java)
startActivity(intent1)
}
}
Solution
The issue is that you should define all the callbacks at once. You are only defining the callback for button1
after button
gets pressed:
val button = findViewById<ImageButton>(R.id.bt1)
button.setOnClickListener {
val intent = Intent(this, aykutelmas::class.java)
startActivity(intent)
}
val button1 = findViewById<ImageButton>(R.id.bt2)
button1.setOnClickListener {
val intent1 = Intent(this, deepturkish::class.java)
startActivity(intent1)
}
I cannot help you with the voice issue because you did not provide code.
Answered By - xjcl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.