Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
531 B
1
Indexable
Never
// MainActivity.kt

package com.example.myfirstapp

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        
        // Create a TextView
        val textView = TextView(this)
        textView.text = "Hello, World!"
        
        // Set the TextView as the content view for the activity
        setContentView(textView)
    }
}
Leave a Comment