Прокрутка LinearLayout, но EditText этого не делает.Как сделать EditText прокручиваемым внутри прокручиваемого LinearLayout?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top"
android:orientation="vertical" >
<EditText
android:id="@+id/messageeditor_editText2"
android:layout_width="match_parent"
android:layout_height="200dp"/>
</LinearLayout>
</ScrollView>
Я устанавливаю EditText прокручивать с:
editText.setMovementMethod(new ScrollingMovementMethod());
EDIT:
Я попытался сделать следующее, но не знаете, как отключить мой Scrollview, это фокус для прослушивания изменений для моего edittext:
private OnFocusChangeListener focuschangelistener = new OnFocusChangeListener(){
@Override
public void onFocusChange(View arg0, boolean arg1) {
if(arg1){
sv.setEnabled(false);
}else{
}
}
};