How to make edittext in Android scrollable?
Try this, Hope it Helps
questionEntry.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (v.getId() == R.id.inputFormComments) {
v.getParent().requestDisallowInterceptTouchEvent(true);
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_UP:
v.getParent().requestDisallowInterceptTouchEvent(false);
break;
}
}
return false;
}
});
Just let it know that it should act that way by:
android:isScrollContainer="true"
I know this question has already got an answer, but if you wish to get the same result via XML, change
android:inputType="text"
to
android:inputType="textMultiLine"
for a vertically scrollable EditText.
questionEntry.setScroller(new Scroller(myContext));
questionEntry.setMaxLines(1);
questionEntry.setVerticalScrollBarEnabled(true);
questionEntry.setMovementMethod(new ScrollingMovementMethod());
i made some changes in my previous code.
above posted is my new code.
it s working...thanks for all