Iam new to Android, iam developing an application with listview in a scrollview. According to my requirement i need to show some of views with vertical scrolling and below that a listview. I want to scroll the entire view and listview vertically, where as listview must scroll independently. I have googled for the solution but found that we should not use Listview in a scrollview.
I have tried An alternative to this, by replacing the Listview with the Dynamic LinearLayouts, that is also not working.
I tried doing the disabling the focus of the ScrollView when I touch the ListItem and viceversa, but i didn't get it.
I tried the below code to disable the focus of scroll view.
mScrollView.setFocusableInTouchMode(true);
mScrollView.setFocusable(true);
mScrollView.setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
mScrollView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
v.requestFocusFromTouch();
return false;
}
});
Please help me out, thanks in advance