Android(安卓)AlertDialog去除白色边框
16lz
2021-12-04
使用styles.xml风格:
<style name="FullScreenDialog" parent="android:style/Theme.Dialog"><item name="android:windowNoTitle">true</item><item name="android:windowFrame">@null</item><item name="android:windowIsFloating">true</item><item name="android:windowIsTranslucent">false</item><item name="android:background">@android:color/black</item><item name="android:windowBackground">@null</item><item name="android:backgroundDimEnabled">false</item></style>
使用AlertDialog的上层接口类:
Dialog reNameDialog = new Dialog(getContext(), R.style.FullScreenDialog);LayoutInflater mLayoutInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);View reNameView = mLayoutInflater.inflate(R.layout.audiorecord_rename, null);LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);reNameDialog.addContentView(reNameView, params);reNameDialog.show();
更多相关文章
- Android(安卓)使用 TableLayout 布局拉伸宽度
- AndroidWebView的使用
- Android控件之Button图片文字的混排
- 使用 Android(安卓)Studio 进行测试 (二) UI 测试
- Android链式方法显示Dialog
- android中使用local_manifest.xml添加软件
- [置顶] androidの下拉菜单Spinner使用
- Android(安卓)display架构分析(五)
- Android版本28使用http请求报错not permitted by network securi