android Dialog&AlertDialog
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的更多相关文章
- Android Dialog AlertDialog
1.普通的对话框 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" andro ...
- Android DevArt2:Android 5.0下 Dialog&AlertDialog 并不会影响Activity的生命周期
先给出结论:Dialog和AlertDialog并不会影响到Activity的生命周期,但会影响到Activity的优先级. 核心代码: onCreated中: Resources resources ...
- android dialog
/** * @Title MenuTest.java * @package com.example.standardview * @since * @version 1.0.0 * @author V ...
- Android:AlertDialog对话框
1.简单的ALertDialog: Dialog alertDialog = new AlertDialog.Builder(this) .setTitle("标题") .setM ...
- Android Dialog使用举例
在Android开发中,我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择.这些功能我们叫它Android Dialog对话框,在我们使用Android的过程中,我归纳了一 ...
- 自定义android Dialog
1.自定义Dialog: import android.app.AlertDialog; import android.app.Dialog; import android.content.Conte ...
- Android之AlertDialog.Builder详解
import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; ...
- 【Android】Android在AlertDialog使用大全
package com.ceac.deng; import android.R.string; import android.support.v7.app.ActionBarActivity; imp ...
- Android Dialog对话框
Dialog的基本方法 //创建Dialog AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); //设 ...
随机推荐
- 详解ASP.NET MVC的请求生命周期
本文的目的旨在详细描述asp.net mvc请求从开始到结束的每一个过程. 我希望能理解在浏览器输入url并敲击回车来请求一个asp.net mvc网站的页面之后发生的任何事情. 为什么需要关心这些? ...
- MySQL-多条件拼接语句
BEGIN "; SET @_where=""; THEN SET @_where= CONCAT(@_where," AND sourcedomain=\&q ...
- WebCrawler
WebCrawler WebCrawler is a metasearch engine that blends the top search results from Google Search a ...
- c#操作mysql积累
1,连接字符串 Server=localhost;port=;User ID=root;password=admin;database=;charset=utf8;Allow User Variabl ...
- idea intellij 混淆anroid代码
idea intellij 混淆anroid代码 在project.properties中加入 target=android-14proguard.config=proguard.cfg 点击 Bui ...
- MySQL语句执行顺序
执行顺序:见:http://www.cnblogs.com/rollenholt/p/3776923.html 下面我们来具体分析一下查询处理的每一个阶段 FORM: 对FROM的左边的表和右边的表计 ...
- C fread
fread是一个函数.从一个文件流中读数据,最多读取count个元素,每个元素size字节,如果调用成功返回实际读取到的元素个数,如果不成功返回 0. 函数原型 size_t fread ( void ...
- Tomcat学习记录
阅读摘录如下: 本质 Tomcat最本质就是个能运行JSP/Servlet的Web服务器 , 因此最典型的应用就是用户通过浏览器访问服务器,Tomcat接收到请求后转发给Servlet,由Servle ...
- Python 中的枚举类型~转
Python 中的枚举类型 摘要: 枚举类型可以看作是一种标签或是一系列常量的集合,通常用于表示某些特定的有限集合,例如星期.月份.状态等. 枚举类型可以看作是一种标签或是一系列常量的集合,通常用于表 ...
- 关于thinkphp开发的几种规范(仅限个人)
一.只要设计到where查询语句,无论是增删改查 $cn['username'] = session('member.username'); $cn['itemid'] = $itemid; $ite ...