I want to ScrollText in Edittext and also show Scrollbar at corner. I Scroll the text By Using
questionEntry.setScroller(new Scroller(myContext));
questionEntry.setMaxLines(1);
questionEntry.setVerticalScrollBarEnabled(true);
questionEntry.setMovementMethod(new ScrollingMovementMethod());
Scrolling text works, but the ScrollBar isn't visible. How can I make it visible?
Please add android:scrollbars="vertical" to your xml code of edit text, and it will work fine. Show activity on this post. EditText dwEdit = (EditText) findViewById(R. id.
To add multiple views within the scroll view, make the direct child you add a view group, for example LinearLayout , and place additional views within that LinearLayout. Scroll view supports vertical scrolling only. For horizontal scrolling, use HorizontalScrollView instead.
than change layout design. or if it's possible for you than try this android:layout_height="match_parent" to RelativeLayout and give it a fix id also. maybe it's work for you.
This may help you.
<EditText android:id="@+id/edt_task_disc" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:gravity="top"
android:background="@drawable/text_aerea"
android:hint="Task Discription"
android:textSize="15sp" android:paddingLeft="5dp"
android:maxHeight="35dp"
android:scrollbars="vertical"
/>
Please add android:scrollbars="vertical"
to your xml code of edit text, and it will work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With