1. Dialog dialog = new Dialog(context,R.style.AppBaseTheme);
  2.  
  3. wifiView = AppData.inflater.inflate(R.layout.wifi_ip_info_form, null);
  4. dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  5. dialog.setContentView(wifiView);
  6. /*
  7. Window dialogWindow = dialog.getWindow();
  8. //getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
  9. //WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
  10.  
  11. dialogWindow.setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
  12. dialogWindow.setGravity(Gravity.TOP);
  13. dialog.show();*/
  14. 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);

  1.  

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. 简单的SQL联表更新

    UPDATE dbo.bankinfo1 SET bankinfo1.BankName=BankInfo.BankName FROM BankInfo where bankinfo1.banknumb ...

  2. C# 的EF框架怎么连接Oracle数据库

    安装odp.net ODP.NET你不需要安装Oracle,不需要配置oracle.key文件,不需要配置TnsNames.Ora文件 不需要配置环境变量:完全的傻瓜式的在没有安装oracle数据库或 ...

  3. 从Bayesian角度浅析Batch Normalization

    前置阅读:http://blog.csdn.net/happynear/article/details/44238541——Batch Norm阅读笔记与实现 前置阅读:http://www.zhih ...

  4. 将一个Asp.Net网站改为MVC

    背景:   网站已经开发的一部分 主要是Web服务和API  现在要做一些给人看的页面 转载请注明出处 http://www.cnblogs.com/zaiyuzhong/p/add-mvc-in-w ...

  5. 虚拟机和windows主机中的文件共享

    22:54 2015/12/22 虚拟机和windows主机中的文件共享:特别推荐:我的一个老师特别推荐的方法:在windows安装SSH Secure File Transfer Client,直接 ...

  6. 【BZOJ3669】[Noi2014]魔法森林 LCT

    终于不是裸的LCT了...然而一开始一眼看上去这是kruskal..不对,题目要求1->n的路径上的每个点的两个最大权值和最小,这样便可以用LCT来维护一个最小生成路(瞎编的...),先以a为关 ...

  7. Python中的高级特性

    1.切片.使用“[”和“]”即可,类似Matlab,可以切list,tuple,字符串等. 2.迭代.Python内置的enumerate函数可以把一个list变成索引-元素对. 3.列表生成式.列表 ...

  8. O(n)求1-n的逆元

    转自:http://www.2cto.com/kf/201401/272375.html 新学的一个求逆元的方法: inv[i] = ( MOD - MOD / i ) * inv[MOD%i] % ...

  9. Ubuntu系统的安装与使用 深度音乐播放器

    1.添加深度音乐播放器的ppa源并更新源缓存 sudo add-apt-repository ppa:noobslab/deepin-sc  sudo apt-get update 2. 安装需要的依 ...

  10. SSH整合(Struts2+hibernate+spring)

    1.创建表 create table t_user( id int primary key auto_increment, username varchar(50), password varchar ...