@Override
public void onClick(View v) {
LayoutInflater from = LayoutInflater.from(getActivity());
LinearLayout contentView = (LinearLayout) from.inflate(R.layout.activity_calendar_month_list , null);
final PopupWindow pop = new PopupWindow(contentView, 250, 400, true );
for( int i=0; i<5; i++){
TextView text = (TextView) from.inflate(R.layout.activity_calendar_month_list_item , null);
text.setText( "2012-12-12");
contentView.addView(text);
text.setOnClickListener( new OnClickListener() {
@Override
public void onClick(View v) {
pop.dismiss();
}
});
}
pop.setOutsideTouchable( false);
pop.setFocusable( true);
pop.setBackgroundDrawable( new BitmapDrawable());
pop.showAsDropDown(v);
}
PopWindows 下拉列表框 spinner 锚点
最新推荐文章于 2022-12-30 16:25:00 发布