In the layout:
<EditText
android:id="@+id/textArea_information"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="top|left"
android:inputType="textMultiLine"
android:overScrollMode="always"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical"
android:lines="6"
android:textAppearance="?android:attr/textAppearanceMedium"
android:scrollHorizontally="false" />
In the Activity/Fragment:
EditText textArea = (EditText) findViewById(R.id.textArea_information);
textArea.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
v.getParent().requestDisallowInterceptTouchEvent(true);
switch (event.getAction() & MotionEvent.ACTION_MASK){
case MotionEvent.ACTION_UP:
v.getParent().requestDisallowInterceptTouchEvent(false);
break;
}
return false;
}
});