[spacer height=”default”] In Android when we want to display any text which should attract user’s view or any information which needs to be displayed to user we can show it by using a Marquee. Generally web designers may easily understand what is a marquee but for novice android developers it may take few more steps… But today we will discuss what is a marquee before getting on to tutorial.         [spacer height=”default”]
[spacer height=”default”]

Creating MainActivity.java File

For making textview to appear in marquee animated style intitialise them and then state them as setSelected(true)

Full Code

Creating activity_main.xml file

Now major part in this tutorial is in xml file, all the declarations for text to be displayed in marquee is assigned in this design.   We will see it step wise   first thing make your textview width “fill_parent”

should appear in single line so

here ellipsize means it will place “…” if necessary

repeat marquee

scroll horizontally

code for textview

  Final Full Code  

[spacer height=”default”]

[spacer height=”default”]

Output :


[spacer height=”default”]

Show Buttons
Hide Buttons
Read previous post:
Android Insert Details into MySQL Database