全屏Dialog实现方法

来源:互联网 发布:win10中的keeper软件 编辑:程序博客网 时间:2024/06/05 20:02

记录一个全屏dialog的小功能方法:
代码:

    /**显示天气信息的对话框*/    private void showWeatherInfoDialog() {        Dialog weatherInfoDialog = new Dialog(this, R.style.Dialog_Fullscreen);        weatherInfoDialog.setContentView(R.layout.dialog_weatherinfo);        findViewOfWeatherInfoDialog();//找到天气信息对话框的控件        DialogAnimation();//设置动画        weatherInfoDialog.show();//显示    }

values下styles文件:

 <style name="Dialog_Fullscreen">        <item name="android:windowNoTitle">true</item>      </style> 
1 0
原创粉丝点击