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. 拓扑排序 - 并查集 - Rank of Tetris

    Description 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球. 为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球 ...

  2. angularJS学习资源最全汇总

    基础 官方: http://docs.angularjs.org angularjs官方网站已被墙,可看 http://www.ngnice.com/: 官方zip下载包 https://github ...

  3. debian C++ OTL库 用 unixodbc 连接 mysql 小记

    这个东东也是折腾了几天,网上很多文章可能已经过时,所以写下不同,以备后用. 参考网址: http://blog.csdn.net/genganpeng/article/details/7402229 ...

  4. ArrayList 实现删除重复元素(元素为对象类型)

    package 集合; import java.util.ArrayList;import java.util.Iterator; /* * 删除集合中的重复的元素(元素是对象形式的) *  * Li ...

  5. CSS3的高级特性

    CSS3对响应式设计非常有用:使用CSS3替代图片,在有带宽限制的网页中可有效减少http请求(从而使网页加载更快),并可使网页更灵活.更容易维护. 在开发CSS3时,要记住添加相关的浏览器私有前缀以 ...

  6. 使用mutt+msmtp在Linux命令行界面下发邮件(续)

    一年前写过一篇<使用mutt+msmtp在Linux命令行界面下发邮件>,但是最近想照着文中的办法解决新的问题时发现又有新的疑惑了,所以就有了今天这篇“续集”. 首先说说msmtp.如果你 ...

  7. cocos2dx中的ScrollView

    ScrollView由视窗区域(裁剪区域)和内容区域组成,内容区域叫innerContainer. 视窗区域范围:get/setContentSize 内容区域:get/setInnerContain ...

  8. php 读取文件

    <?php /** *@param string $ip *@return string ip对应的地区 */ function getLocation($ip) { $ip_file_path ...

  9. Linux分区方案 (转)

    以下是我的centOS6.2系统分区方案,做个记录,方便后续的参考. 根分区: >= 3G /boot (启动分区): 100M即可. /swap : 网上说是物理内存的两倍,实际随便你,看自己 ...

  10. js事件模型与自定义事件

    JavaScript 一个最简单的事件模型,需要有事件绑定与触发,还有事件删除. var eventModel = { list: {}, bind: function () { var args = ...