I have Listview with editext and textview.
When i touch on edittext then edittext lost focus!
I resolved this problem by setting android:windowSoftInpu
ListView
recreate the View,
Try to use a LinearLayout
inside in ScrollView, then in your code use a runOnUiThread
to fill your view in an other thread like this
public void fillDataTask(Context context, final LinearLayout listView) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
fillView(context, listView);
}
});
}
private void fillView(Context context, LinearLayout listView) {
MyAdapter adapter = new MyAdapter(context);
final int adapterCount = adapter.getCount();
for (int i = 0; i < adapterCount; i++) {
View item = adapter.getView(i, null, null);
listView.addView(item);
}
}