Skip to content

Commit

Permalink
Commenting the code
Browse files Browse the repository at this point in the history
  • Loading branch information
theyashgrover authored Aug 24, 2021
1 parent ffcad88 commit 1b57dad
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ import android.widget.EditText
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*

//class starts here :
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
//the kotlin code is linked to activity_main.xml file here:
setContentView(R.layout.activity_main)
}

//function for creating the birthday card :
fun createBirthdayCard(view: View) {

//variable to store the name being input by the user :
val name = nameInput.editableText.toString()
//passing the intent to another activity (the one responsible for creating the birthday card)..
val intent = Intent(this,BirthdayGreetingActivity::class.java)
//passing the name with the help of a keyword..
intent.putExtra("name",name)
startActivity(intent)

}
}
}

0 comments on commit 1b57dad

Please sign in to comment.