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); //设 ...
随机推荐
- Delphi Webbrowser 修改 textarea 值 百度
有个按钮 调用 <a href="#" onclick="$.ajax({url: '/redmine/journals/edit/29606.js', type ...
- Leetcode 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...
- Leetcode Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. You ...
- debian 安装svn apache 小记. AuthzSVNAccessFile 不生效问题.
docker 使用docker镜像搭建svn+Apache环境 https://my.oschina.net/u/2006667/blog/637882 1,安装 apache ,svnapt-get ...
- js事件机制——事件冒泡和捕获
概念:当给子元素和父元素定义了相同的事件,比如都定义了onclick事件,点击子元素时,父元素的onclick事件也会被触发.js里称这种事件连续发生的机制为事件冒泡或者事件捕获. IE浏览器:事件从 ...
- 动态调用webservice(部分转载)
动态调用webservice,做个笔记: public class WSHelper { /// < summary> /// 动态调用web服务 /// < /summary> ...
- vim正则表达式~转
vim正则表达式(转) Vim中的正则表达式功能很强大,如果能自由运用,则可以完成很多难以想象的操作. 如果你比较熟悉Perl的正规表达式,可以直接参照与Perl正则表达式的区别一节. 一.使用正则表 ...
- PHP中GBK和UTF8乱码解决方案
我用的appserv-win32-2.5.10做的环境,装这个包的时候用默认的utf8编码.在写数据库连接文件时,写成: $conn = mysql_connect("$host" ...
- ScrollBar, Not working
Case 1: TabPanel autoScroll, DataGridView full anchor. DataGridView full anchor to partial anchor, t ...
- Unity5和WebGL移植指南的一些总结
对于手游开发者来说,更新版本往往意味着非常复杂的过程,你需要根据反馈做更新.测试.提交然后等待审核,而由于不需要客户端依赖,页游往往是快速测试游戏版本的最佳途径,很多人可能都知道Unity 5可以再不 ...