Skip to content Skip to sidebar Skip to footer

Marquee In Android

I want to marquee the textview but am not getting success to do it properly. Though i have gone through some examples give in stackoverflow, but still having problem. can anybody h

Solution 1:

try this it is working for me

<TextViewandroid:text="Android Marquee"android:id="@+id/MarqueeText"android:layout_width="fill_parent"android:layout_height="wrap_content"android:singleLine="true"android:ellipsize="marquee"android:marqueeRepeatLimit="marquee_forever"android:scrollHorizontally="true"android:paddingLeft="15dip"android:paddingRight="15dip"android:focusable="true"android:focusableInTouchMode="true"android:freezesText="true"></TextView>

Solution 2:

It is the minimum code to create a marque -

<?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical" ><TextViewandroid:id="@+id/MarqueeText"android:layout_width="wrap_content"android:layout_height="wrap_content"android:ellipsize="marquee"android:focusable="true"android:focusableInTouchMode="true"android:scrollHorizontally="true"android:singleLine="true"android:text="This is a very long text which is not fitting in the screen so it needs to be marqueed."android:textAppearance="?android:attr/textAppearanceLarge" />

To make your marque more presentable view this: http://yhisham.blogspot.in/2012/08/android-how-to-make-marquee-ticker.html

Post a Comment for "Marquee In Android"