private void popw(RelativeLayout rr, final String[] st, final TextView tv) {
listview = new ListView(getActivity());
listview.setCacheColorHint(0x000000);
listview.setVerticalFadingEdgeEnabled(false);
listview.setDividerHeight(0);
listview.setBackgroundResource(R.drawable.cp_jx_xiala_bk);
Myadapter adapter = new Myadapter(st);
listview.setAdapter(adapter);
pu = new PopupWindow(listview, rr.getWidth(),
LayoutParams.WRAP_CONTENT, true);
pu.setBackgroundDrawable(new ColorDrawable(0x00000000));
pu.setFocusable(true);
pu.setOutsideTouchable(true);
pu.setBackgroundDrawable(new BitmapDrawable());
if (pu.isShowing()) {
pu.dismiss();
} else {
pu.showAsDropDown(rr);
}
listview = new ListView(getActivity());
listview.setCacheColorHint(0x000000);
listview.setVerticalFadingEdgeEnabled(false);
listview.setDividerHeight(0);
listview.setBackgroundResource(R.drawable.cp_jx_xiala_bk);
Myadapter adapter = new Myadapter(st);
listview.setAdapter(adapter);
pu = new PopupWindow(listview, rr.getWidth(),
LayoutParams.WRAP_CONTENT, true);
pu.setBackgroundDrawable(new ColorDrawable(0x00000000));
pu.setFocusable(true);
pu.setOutsideTouchable(true);
pu.setBackgroundDrawable(new BitmapDrawable());
if (pu.isShowing()) {
pu.dismiss();
} else {
pu.showAsDropDown(rr);
}