加载一个布局
View inflate = LayoutInflater.from(v.getContext()).inflate(R.layout.item_car, null);
PopupWindow pop_car = new PopupWindow(inflate, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, true)
设置布局
pop_car.setContentView(inflate)
设置弹出位置
相对于全局弹出位置
pop_car.showAtLocation(inflate, Gravity.BOTTOM, 0, 0);
相对于控件弹出位置
pop_car.showAsDropDown(showCar,0,0);
09-15
04-05