Android Dialog对话框

  -- 底部对话框菜单样式 -->
    -- 全屏-车辆类型 -->
    
// 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'

效果图
Android Dialog对话框_第1张图片

你可能感兴趣的:(安卓开发,开发技巧)