How To Allow Scrolling In Android's Popupwindow
I have a PopupWindow that is populated with a LinearLayout. I instatiated my popup window like this: PopupWindow pw = new PopupWindow(layout, 450, 700, true); pw.showAsDropDown(la
Solution 1:
LinearLayouts aren't scrollable, so instead enclose the LinearLayout in a ScrollView.
Solution 2:
I do it using this and worked:
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/layout_popup"android:layout_width="fill_parent"android:layout_height="fill_parent"><ScrollViewandroid:layout_width="wrap_content"android:layout_height="wrap_content" ><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:background="#444444"></RelativeLayout></ScrollView></LinearLayout>
I hope it can be useful for you. Bye
Post a Comment for "How To Allow Scrolling In Android's Popupwindow"