행운을 비면서 ListPopupWindow의 너비와 높이를 설정하려고합니다. 나는 LayatParams에 대해 읽었지만 ListPopupWindow에는 setLayoutParams가 없다. 이 매개 변수는 어떻게 설정합니까?ListPopupWindow : setWidth, setHeight는 아무런 효과가 없습니다.
ListPopupWindow lpw = new ListPopupWindow(TestActivity.this);
CustomAdapter stringAdapter = new CustomAdapter(TestActivity.this, R.layout.row,strings);
lpw.setAdapter(stringAdapter);
lpw.setAnchorView(v);
lpw.setWidth(150);
lpw.setHeight(300);
lpw.show();
여기서 v는 버튼입니다.
어댑터 내부에 어떤 것이 있습니까? –
문자열 목록이 어댑터에 있습니다. – benkdev