package com.example.loanlandingapp

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val buttonLoanDetails = findViewById<View>(R.id.buttonLoanDetails)
        val buttonApplyLoan = findViewById<View>(R.id.buttonApplyLoan)

        buttonLoanDetails.setOnClickListener {
            val intent = Intent(this, LoanDetailsActivity::class.java)
            startActivity(intent)
        }

        buttonApplyLoan.setOnClickListener {
            val intent = Intent(this, ApplyLoanActivity::class.java)
            startActivity(intent)
        }
    }
}
 

Kotlin Online Compiler

Write, Run & Share Kotlin code online using OneCompiler's Kotlin online compiler for free. It's one of the robust, feature-rich online compilers for Kotlin language. Getting started with the OneCompiler's Kotlin editor is easy and fast. The editor shows sample boilerplate code when you choose language as Kotlin and start coding.