[su_youtube_advanced url=”https://youtu.be/anRQQ54xPaA”]
In previous chapter we learn about type of Views in android.
Now, We Gonna start looking at code.
Lets bring your android IDE and start coding for textview
Download the Android studio
Start your first project by choosing templates you can choose any template you want
Here I am choosing the empty activity
Click next
Choose the name this will be the name of your app
In language you can choose between java and kotlin
Click finish
Make sure you have connected to internet while creating your first project on android studio.
Click finish,
This will take some time.
When completed,
You will get two files mainactivity.java and activity_main.xml
In activity main dot xml you can see the blueprint of your app design
This hello world is TextView which you will get every-time
You can also switch to code view and to start coding for TextView
Either you can choose drag and drop for textview
Just grab and drop in your design
It will automatically create code for this TextView
or you can create by yourself
Lets Create a textview using this code
You can customized your textview with lot of attributes
Such as text size, text color, text alignment, text style and lot more
[su_box title=”TextView” style=”noise” box_color=”#2ddafe” radius=”12″] [/su_box]
You can always hit google and search for text view in android.
Android developers is the best source to gain knowledge about attributes of text view
There are hundreds of textview attributes which can be used to customize your text view.
Let’s end this chapter and start coding on your own.
Believe it or not professional developers never memorize everything!
No comments:
Post a Comment