我正在使用弹出窗口来显示日历视图,在显示弹出窗口时它会折叠整个视图,即它会干扰旁边的视图,它不会像 Spinner(微调器适配器视图)那样弹出。可能是什么问题,这是我的代码
private void showPopup(Context context,LinearLayout Parent,final View v) {
LayoutInflater layoutInflater = (LayoutInflater)context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layout = layoutInflater.inflate(R.layout.popupl,Parent,true);
// Creating the PopupWindow
final PopupWindow popupWindow = new PopupWindow(
layout,700,700);
popupWindow.setFocusable(true);
popupWindow.setContentView(layout);
popupWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
popupWindow.setWidth(250);
new Runnable(){
@Override
public void run() {
popupWindow.showAsDropDown(v, -5, 0);
}
};
}