Android Lesson 2 - TextView, Button &  setOnClickListener for Button

Android Lesson 2 - TextView, Button & setOnClickListener for Button

Android Widgets Android TextView Android TextView is a basic user interface element that helps you display text to the user. Following Kotlin Android Tutorials take you through the Implementation of a simple TextView to display Hello World; To create TextView dynamically through programming and set a listener to it to respond for a click on the TextView; To get acquainted with some of the properties of TextView like colour, font size, background, layout options, etc. Android Button Buttons are present in most User Interface applications. Android provides Button as a User Interface element wherein a user can tap on it or click for triggering an action. Following Kotlin Android Tutorials help to get started with Android Button, create a Button dynamically through programming and add it to the user interface layout, set an action listener to it to listen for clicks, change some of the default properties like text colour, text size, background, etc. Kotlin setOnClickListener for Button Android Button widget is a UI element generally used to receive user actions as input. You can click on a Button, long press, etc. In this example, we shall learn to set OnClickListener for Button.