Enabling scrollbar in EditText Android
Posted
by
Sammm
on Stack Overflow
See other posts from Stack Overflow
or by Sammm
Published on 2010-11-30T22:40:47Z
Indexed on
2012/11/09
17:00 UTC
Read the original article
Hit count: 206
I have an EditText on my layout. Below are the attributes I currently have:
<EditText
android:id="@+id/entryIdea"
android:layout_width="fill_parent"
android:layout_height="225sp"
android:gravity="top"
android:background="@android:drawable/editbox_background"
android:scrollbars="vertical"/>
However, I can see the scrollbar but can't scroll it with mouse/touch. I thought that it may works if I put the corresponding listener since it works on TextView. Apparently, it isn't.
EditText et = (EditText)findViewById(R.id.entryIdea);
et.setMovementMethod(new ScrollingMovementMethod());
Can you guys help me on this?
Thank you so much in advance. Sammy
© Stack Overflow or respective owner