Advertisement
joespi

Untitled

Sep 11th, 2021
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.61 KB | None | 0 0
  1. package com.example.holajoaco
  2.  
  3. import androidx.appcompat.app.AppCompatActivity
  4. import android.os.Bundle
  5. import android.widget.TextView
  6.  
  7. class WelcomeToTheJungle : AppCompatActivity() {
  8.     private lateinit var welcomeText: TextView
  9.  
  10.     override fun onCreate(savedInstanceState: Bundle?) {
  11.         super.onCreate(savedInstanceState)
  12.         setContentView(R.layout.activity_welcome_to_the_jungle)
  13.  
  14.         welcomeText = findViewById(R.id.welcomeMessage)
  15.  
  16.         val bundle = intent.extras
  17.         val welcomeName = bundle?.getString(USER_NAME)
  18.  
  19.         welcomeText.text = "Welcome ${welcomeName}"
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement