Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:27:11+00:00 2026-06-10T07:27:11+00:00

I am doing an application in which I have a textview and an image

  • 0

I am doing an application in which I have a textview and an image view inside a LinearLayout. Touching the linear layout takes us to another activity. As the text wont fit inside the textview, I want to make the textview content marquee. I have tried may methods but it is not working. The xml content is given below.

<LinearLayout
    android:id="@+id/profile_pic_Layout"
    android:layout_width="fill_parent"
    android:layout_height="100dip"
    android:layout_margin="10dip"
    android:background="@color/blue_background" >

    <ImageView
        android:id="@+id/profile_pic_menu"
        android:layout_width="100dip"
        android:layout_height="100dip"
        android:contentDescription="@string/image"
        android:scaleType="centerCrop" />

    <TextView
        android:id="@+id/profile_name_text"
        android:layout_width="fill_parent"
        android:layout_height="30dip"
        android:layout_gravity="bottom"
        android:gravity="center"
        android:marqueeRepeatLimit="1"
        android:inputType="text"
        android:lines="1"
        android:duplicateParentState="true"
        android:scrollHorizontally="true"
        android:fadingEdge="horizontal"
        android:focusable="true"
        android:textColor="@android:color/white"
        android:textSize="20sp">
        <requestFocus android:focusable="true" 
            android:focusableInTouchMode="true"
            android:duplicateParentState="true"  /> 
    </TextView>
</LinearLayout>

I have also tried setting the textview selected in the code by using,

profileNameTextView.setEllipsize(TruncateAt.MARQUEE);
profileNameTextView.setSelected(true);

I think the it is because, the the parent linearlayout is having the focus.
Please help me fix this issue..!

Thank you all in advance..!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:27:13+00:00Added an answer on June 10, 2026 at 7:27 am

    Apparently you are missing the android:ellipsize="marquee" attribute

    Here’s a minimalistic working example:

       <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:marqueeRepeatLimit="1"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:focusable="true"
            android:focusableInTouchMode="true"
            android:text="HELLO HOW ARE YOU WHAT ARE YOU DOING TEST ANDROID IS WRITING TO YOU." />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight application in which I am doing the following thing to
I am doing an application which is of SingleView BASED Application,where i have many
Ha ii ,i am doing a reader application which have chapters in it,i have
I have a java application which doing some logic... ... But the java application
I have an MDI application in which I have a MDI child doing some
i have an application in which i have a UI activity which is supposed
In My application XML layout, I have one Relativelayout, In which there are two
I am developing an android application in which I have to upload image from
I am doing a application which have a sharing note option to Ever-Note,i have
I am doing a reader application in iPhone which have a loginpage the login

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.