Dialog dialog = new Dialog(context,R.style.AppBaseTheme);  

        wifiView = AppData.inflater.inflate(R.layout.wifi_ip_info_form, null);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(wifiView);
/*
Window dialogWindow = dialog.getWindow();
//getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
//WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); dialogWindow.setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
dialogWindow.setGravity(Gravity.TOP);
dialog.show();*/
dialog.show();

String title = "\n\""+itemInfo.itemSSID+"\" ";
View password_view = AppData.inflater.inflate(R.layout.wifi_cancel_connect, null);
TextView password_title = (TextView)password_view.findViewById(R.id.wifi_show_info);
password_title.setText(title);

final AlertDialog alertDialog = new AlertDialog.Builder(WirelessNetworkActivity.this).create();
alertDialog.setView(password_view);
Window window = alertDialog.getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
alertDialog.show();
lp.width = 920;
lp.height = 300;
lp.alpha = 0.9f;
window.setAttributes(lp);

 

android Dialog&AlertDialog的更多相关文章

  1. Android Dialog AlertDialog

    1.普通的对话框 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" andro ...

  2. Android DevArt2:Android 5.0下 Dialog&AlertDialog 并不会影响Activity的生命周期

    先给出结论:Dialog和AlertDialog并不会影响到Activity的生命周期,但会影响到Activity的优先级. 核心代码: onCreated中: Resources resources ...

  3. android dialog

    /** * @Title MenuTest.java * @package com.example.standardview * @since * @version 1.0.0 * @author V ...

  4. Android:AlertDialog对话框

    1.简单的ALertDialog: Dialog alertDialog = new AlertDialog.Builder(this) .setTitle("标题") .setM ...

  5. Android Dialog使用举例

    在Android开发中,我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择.这些功能我们叫它Android Dialog对话框,在我们使用Android的过程中,我归纳了一 ...

  6. 自定义android Dialog

    1.自定义Dialog: import android.app.AlertDialog; import android.app.Dialog; import android.content.Conte ...

  7. Android之AlertDialog.Builder详解

    import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; ...

  8. 【Android】Android在AlertDialog使用大全

    package com.ceac.deng; import android.R.string; import android.support.v7.app.ActionBarActivity; imp ...

  9. Android Dialog对话框

    Dialog的基本方法 //创建Dialog AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); //设 ...

随机推荐

  1. Android之UI编程(二):表格布局

    表格布局(TableLayout)继承了LinearLayout,它的本质依然是线性布局管理器,表TableLayout采用行.列的形式来管理UI组件,它并不需要明确地声明暴行多少行.多少列,而是通过 ...

  2. centos yum安装saltstack

    1.导入安装源 centos5 rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm cen ...

  3. align使图片和文字居中

    <img src=...  align=absmiddle />

  4. input type=file 图片上传相关

    HTML: <input type="file" name="address"   onchange='PreviewImage(this)' value ...

  5. jQuery用法小结

    jQuery加载1.$(document).ready()2.添加css样式:单个:$("p").css("color","red"); 多 ...

  6. 【iCore3双核心板】发布 iCore3 应用开发平台用户手册

    PDF手册下载地址:http://pan.baidu.com/s/1miBBYi8 iCore3应用开发平台购买地址:https://item.taobao.com/item.htm?spm=a1z1 ...

  7. HDU 5965 枚举模拟 + dp(?)

    ccpc合肥站的重现...一看就觉得是dp 然后强行搞出来一个转移方程 即 根据第i-1列的需求和i-1 i-2列的枚举摆放 可以得出i列摆放的种类..加了n多if语句...最后感觉怎么都能过了..然 ...

  8. Sublime Text 3 杂记

    Sublime Text 是一个功能强大的代码编辑器(收费,但可无限期试用).由程序员Jon Skinner于2008年1月份所开发出来,它最初被设计为一个具有丰富扩展功能的Vim.Sublime T ...

  9. Server-Sent Events(HTML5 服务器发送事件)

    Server-Sent Events简介 Server-Sent Events(SSE)用于网页自动获取服务器上更新的数据,它是一个实时性的机制. 实时性获取数据的解决方案 对于某些需要实时更新的数据 ...

  10. .net core 1.0 中的asp.net identity 的基本使用 序言

    2016年6月底,微软发不了vs2015 up3,在这个版本中,微软做了一些改变,本人目前也尚在学习使用之中,现把学习和使用的心得写出来,错误之处请大家指正. 开发环境:vs2015 UP3   项目 ...