我正在動態listview顯示下面perticular項selected.can任何人建議我怎麼可能?我在這裏證實了快照。如何在選定的特定項目下方顯示列表?
我做了如下的代碼。
root.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// im++;
final ListPopupWindow listPopupWindow = new ListPopupWindow(getActivity());
ArrayList<String> a=new ArrayList<String>();
a.add("a");
a.add("b");
listPopupWindow.setAdapter(new ArrayAdapter(
getActivity(),
R.layout.raw_comment,a.size()));
listPopupWindow.setAnchorView(v);
listPopupWindow.show();
//showAlertDialog(getActivity(), "List display 1");
}
});
你的回答將不勝感激
這不適合我。 – Vasant
你面臨的問題是什麼? –
我把我的代碼放在我的問題中。 – Vasant