Dialog样式的Activity
今天学习了如何做对话框Dialog型的activity。
首先这个对话框
主要是要设置修改manifest.xml中的的theme设置为Theme.Dialog
我们自定义一个theme
android:screenOrientation="portrait" android:theme="@style/bklistDialog"
在value中添加一个style.xml 这是这个主题
<style name="bklistDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/dialog_background</item>//设置背景
<item name="android:windowFrame">@null</item>//设置边框
<item name="android:backgroundDimEnabled">true</item>//设置是否背景模糊
<item name="android:windowIsTranslucent">true</item>//设置半透明
<item name="android:windowNoTitle">true</item>//设置无标题
<item name="android:windowFullscreen">false</item>//设置全屏
</style>
这样跳转到这个activity就像弹出来的对话框dialog一样了