Reputation: 382
as question said , i made popup window on longclick on item listview , I tried this code
private void Show_Comment_Options(View view) {
// TODO Auto-generated method stub
View popupView = activity.getLayoutInflater().inflate(R.layout.popupdialog_comment_option, null);
final PopupWindow popup = new PopupWindow(popupView, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, true);
popup.setBackgroundDrawable(new BitmapDrawable());
popup.setOutsideTouchable(true);
popup.showAsDropDown(view);
int[] location = new int[2];
popupView.getLocationOnScreen(location);
popup.update();
}
but the popup window show perfectly with items that in top screen but with low item it hide some buttons from window like this picture
how make it like facebook made and how make anchor o arrow like facebook make on item
Upvotes: 1
Views: 3376
Reputation: 9461
Try to specify height for your popup. Seem like it's a known problem with it: PopupWindow out of screen when size is unspecified
Upvotes: 2