Untitled

mainactivity
mail@pastecode.io avatar
unknown
plain_text
a year ago
871 B
3
Indexable
Never
package com.rafly_304.elektronik

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.rafly_304.elektronik.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
    private lateinit var binding: ActivityMainBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        binding= ActivityMainBinding.inflate(layoutInflater)
        binding.lenovo.setOnClickListener {
            val intent= Intent(this@MainActivity,DetailedActivity::class.java)
            intent.putExtra("deskripsi",R.string.lenovo)
            intent.putExtra("judul","Lenovo Ideapad Gamin 3")
            intent.putExtra("gambar",R.drawable.lenovo)

            startActivity(intent)
        }
        setContentView(binding.root)
    }
}