<!-- 底部对话框菜单样式 -->
<!-- 全屏-车辆类型 -->
<style name="Dialog_Fullscreen">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowCloseOnTouchOutside">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
// java 代码
Dialog bottomDialog = new Dialog(VioEditCarInfoActivity.this, R.style.Dialog_Fullscreen);
View contentView = LayoutInflater.from(this).inflate(R.layout.item_vio_edit_car_bottom_menu, null);
// 设置dialog的属性
Window dialogWindow = bottomDialog.getWindow();
bottomDialog.setContentView(contentView);
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
dialogWindow.setAttributes(lp);
dialogWindow.setGravity(Gravity.BOTTOM);
bottomDialog.show();
选择器
compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
效果图