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(layout, 80, 80);
However, when the device orientation is switched to landscape, the popup window gets cut off at the bottom and I cannot scroll down. See the screen capture:
The layout underneath this popup is indeed scrollable. So how can I make the popup scrollable?
Thanks,
Igor
LinearLayouts aren't scrollable, so instead enclose the LinearLayout in a ScrollView.
I do it using this and worked:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_popup"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#444444">
</RelativeLayout>
</ScrollView>
</LinearLayout>
I hope it can be useful for you. Bye