我正在使用ListPopupWindow并希望为其添加底部阴影。以下是我的代码 -
listPopupWindow = new ListPopupWindow(getApplicationContext());
listPopupWindow.setContentWidth(500);
listPopupWindow.setDropDownGravity(Gravity.CENTER | Gravity.RIGHT);
listPopupWindow.setSelection(mSelectedPos);
listPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
public void onDismiss() {
listPopupWindow.dismiss();
}
});
Listpopupadapter adapter = new Listpopupadapter(mContext, mGameSortList, GameName, mFilterStr,mListener,Gravity.RIGHT);
listPopupWindow.setAdapter(adapter);
listPopupWindow.setAnchorView(mRightTV);
listPopupWindow.setForceIgnoreOutsideTouch(true);
listPopupWindow.show();
显示弹出窗口时如何显示底部阴影。
TIA
答案 0 :(得分:1)
listPopupWindow.setBackgroundDrawable(new ColorDrawable(Color.BLACK));