tryad1tk

Monday, 28 December 2015

Basic-1

                                                        TextView & EditText



Welcome to our first chapter that teaches about textview and edittext.

  • Textview are the components that are used to show normal strings i.e. texts whereas EditText allows user to input a value.
  • When you see anything written in the app interface it is called Textview and where you'r asked to enter your password or anything it is called EditText


We can use edittext or textview directly from the XML file edittor or we can also do that from java class. like this

From design tab of .xml file-

1-goto resource--->layout----->.xml file i.e. the xml file where you want to add the edittext or                   textview.
2-In palette tab you will see textview and edittext ,just select and drag them on the preview screen           align it accordingly.
3-dimensions of the textview and edittext box can be adjusted either by dragging the corners or by         manually entering the value of width and height in dp/sp in the box given on the right side of the             screen under properties tab(below components tree tab)
4-the text (value to be shown) can be entered under the option in properties tab and similarly other         properties can also be changed according to the users need.
5-similarly size,background,text style ,text color can be changed.

this is the easiest way of using edittext and textview and you may get confused  so we will not be discussing the other method .


Don't forget to follow and share for more tutorials.
Check out these cool app .

No comments:

Post a Comment