我想为我的自定义对话框创建一个阴影是可能的吗?
GhazalActivity.public void viewShareMenu() {
Dialog share=new Dialog(this,R.style.shareDialogStyle);
share.setContentView(R.layout.share_popup_layout);
LayoutParams params = share.getWindow().getAttributes();
params.y = this.getResources().getDimensionPixelSize(R.dimen.topbar_height);
params.gravity=(Gravity.RIGHT|Gravity.TOP);
share.getWindow().setAttributes(params);
share.show();
}
styles.xml:
@color/transparent
true
true
1500
@color/temp
0
5
10
false
share_popup_layout.xml:
android:layout_width="150dip"
android:background="@color/bg_Ghazal_share_menu"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
style="@style/shareDialogButtons"/>
这样做有什么解决方案吗?