android - ScrollView Not Responding -
i have following xml , not doing fancy overriding scrolling behaviors:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <scrollview android:id="@+id/myscrollview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillviewport="true" android:layout_weight="1"> <listview android:id="@+id/mylistview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </scrollview> <textview android:id="@+id/my_empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/my_foo" android:gravity="center" android:visibility="gone" /> </linearlayout> however, while embedded listview respond presses , long presses, not scroll. doing wrong?
the trailing textview listview's emptyview.
scrollview not play nicely other view scrolls natively, i.e webview, listview, etc.
try relative layout , see if need.
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <listview android:id="@+id/mylistview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alingparenttop="true" /> <textview android:id="@+id/my_empty" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/my_foo" android:gravity="center" android:visibility="gone" android:layout_alignparentbottom="true" /> </relativelayout>
Comments
Post a Comment