For some reason I can't get this popup to react to clicks, onItemClick is not called.
String[] actions = new String[]{"1", "2", "3"};
ArrayAdapter adapter = new ArrayAdapter<String>(getContext(), R.layout.layout_popup_list_item, actions);
popupWindow = new ListPopupWindow(getContext());
popupWindow.setAnchorView(btnConferenceActions);
popupWindow.setAdapter(adapter);
popupWindow.setWidth(measureContentWidth(adapter));
popupWindow.setDropDownGravity(Gravity.END);
popupWindow.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
hideConferenceActionsList();
switch (position){
case 0:
Log.i("TAG", "Item 0");
break;
case 1:
Log.i("TAG", "Item 1");
break;
case 2:
Log.i("TAG", "Item 2");
break;
}
});
popupWindow.show();
This popup is shown inside custom view, and it shows fine except it's not reating to clicks