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

  • Home
  • SEARCH
  • 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 8217083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:21:04+00:00 2026-06-07T12:21:04+00:00

problem with making edittext scrollable there is mentioned that it is not scrollable with

  • 0

problem with making edittext scrollable

there is mentioned that it is not scrollable with singleLine=true.

So i have 2 options:

  1. I check if the user inputs “\n” and delete that, then i have to worry about things in the second line, too.

  2. I use a custom textviews which scrolls through in a loop, could this be used here too only for the hint ?

     <com.test.ScrollingTextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_marginTop="1dp"
            android:layout_weight="0.17"
            android:background="@color/black"
            android:ellipsize="marquee"
            android:gravity="center_vertical"
            android:marqueeRepeatLimit="marquee_forever"
            android:paddingLeft="10dp"
            android:scrollHorizontally="true"
            android:singleLine="true"
            android:text="@string/editLength"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="@color/white" />
    

public class ScrollingTextView extends TextView {

public ScrollingTextView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
}

public ScrollingTextView(Context context, AttributeSet attrs) {
    super(context, attrs);
}

public ScrollingTextView(Context context) {
    super(context);
}

@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
    if (focused)
        super.onFocusChanged(focused, direction, previouslyFocusedRect);
}

@Override
public void onWindowFocusChanged(boolean focused) {
    if (focused)
        super.onWindowFocusChanged(focused);
}

@Override
public boolean isFocused() {
    return true;
}

}

I just cant get this formated right. Sorry for that.

  • 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-07T12:21:05+00:00Added an answer on June 7, 2026 at 12:21 pm

    Make your EditText Scrollable like this:

    EditText yourEditText = new EditText(context);
    yourEditText.setScroller(new Scroller(context)); 
    yourEditText.setMaxLines(1); 
    yourEditText.setVerticalScrollBarEnabled(true); 
    yourEditText.setMovementMethod(new ScrollingMovementMethod());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Making websites that appear correctly in IE is a big problem. Is there any
I have a problem making an inner class that extends from JPanel to draw
I have a multithreaded application written in Clojure. There is a problem of making
many people seem to have problem in making this work, so i am not
I have a problem making an advanced (for me) query. I am trying to
I had a problem that was making the original array to change, the curious
I have problem with google map Loading and making center in my java script
I have a problem making Twitter display the main image in the Media sidebar,
I've got a problem making alpha PNGs with PHP GD. I don't have imageMagik
I have a problem making the link between the underlying socket (in this case,

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.