blob: ca2f27b0275d37f04334ed3c967f793ff521c833 [file] [log] [blame]
package org.example.kotlin.mixed
import android.content.Intent
import android.os.Bundle
import android.app.Activity
import android.view.Menu
import android.widget.Button
class KotlinActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main2)
val next = findViewById(R.id.Button02) as Button
next.setOnClickListener {
val intent: Intent = Intent()
setResult(RESULT_OK, intent)
finish()
}
}
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
menuInflater.inflate(R.menu.main_activity2, menu)
return true
}
}