jay's old blog

this blog will be deleted soon - please visit my new blog - https://thesanguinetechtrainer.com

android training - TextView

This is a bit tutorial to give you some insights about the Android widget – TextView – and stuff that about it that just might be useful to you.

  • TextView is perhaps the most basic of widgets that you will be using when building your apps. You will use it primarily to display information. Here are some scenarios where you might use TextView
  • You want to display a message, asking the user to do something.
  • For instance, in the ‘alert nildna’ app, we are using TextView to display messages like ‘enter the random key’ and also to display the downloaded GPS data.
  • You want to update information after it has been collected from the user.

The Android Studio already provides a number of different types of TextView widgets. Look at this image here. You see, all those four options are all ‘TextView’ widgets but with different options.

You will get the properties option, when you select the TextView widget like this. On the left side is the TextView display some basic information and on the right is the properties of this widget.

Further, you may want to consider doing some additions to the properties.

  • Id – use this to set the id of your widget.
  • Text – use this to set the text.
  • Width – you can adjust the width of this property, height as well as width.
Follow me on twitter, facebook and instagram for more updates. Thanks!
Comments are closed