Android英文文档翻译系列(4)——PopupWindow
PopupWindow
java.lang.Object | |
↳ | android.widget.PopupWindow //widget |
Class Overview//概述
A popup window that can be used to display an arbitrary view. The popup windows is a floating container that appears on top of the current activity.
//一个泡泡窗,可以展示任意的视图。它是一个悬浮的容器,出现在当前Acitvity的上面。
public static interface //有一个回调接口
PopupWindow.OnDismissListener
android.widget.PopupWindow.OnDismissListener
Class OverviewListener that is called when this popup window is dismissed.
void android.widget.PopupWindow.setFocusable(boolean focusable)
public void setFocusable (boolean focusable)Since: API Level 1
Changes the focusability of the popup window. When focusable, the window will grab the focus from the current focused widget if the popup contains a focusable If the popup is showing, calling this method will take effect only the next time the popup is shown or through a manual call to one of the public void setOutsideTouchable (boolean touchable)Since: API Level 3
Controls whether the pop-up will be informed of touch events outside of its window. This only makes sense for pop-ups that are touchable but not focusable, which means touches outside of the window will be delivered to the window behind. The default is false. If the popup is showing, calling this method will take effect only the next time the popup is shown or through a manual call to one of the public void showAsDropDown (View anchor, int xoff, int yoff)Since: API Level 1
Display the content view in a popup window anchored to the bottom-left corner of the anchor view offset by the specified x and y coordinates. If there is not enough room on screen to show the popup in its entirety, this method tries to find a parent scroll view to scroll. If no parent scroll view can be scrolled, the bottom-left corner of the popup is pinned at the top left corner of the anchor view. If the view later scrolls to move Parameters
See Alsopublic void showAsDropDown (View anchor)Since: API Level 1
Display the content view in a popup window anchored to the bottom-left corner of the anchor view. If there is not enough room on screen to show the popup in its entirety, this method tries to find a parent scroll view to scroll. If no parent scroll view can be scrolled, the bottom-left corner of the popup is pinned at the top left corner of the anchor view. Parameters
See Alsopublic void showAtLocation (View parent, int gravity, int x, int y)
|
parent | a parent view to get the getWindowToken() token from |
---|---|
gravity | the gravity which controls the placement of the popup window |
x | the popup's x location offset |
y | the popup's y location offset |
Android英文文档翻译系列(4)——PopupWindow的更多相关文章
- Android英文文档翻译系列(1)——AlarmManager
原文:个人翻译,水平有限,欢迎看官指正. public class Ala ...
- Android英文文档翻译系列(6)——LocalBroadcastManager
public class LocalBroadcastManager extends Object java.lang.Object ↳ android.support.v4.content.L ...
- Android英文文档翻译系列(5)——VPNService
API14位于android.net.VpnService 类概述|Class OverviewVpnService is a base class for applications to ext ...
- Android英文文档翻译系列(3)——AsyncTask
AsyncTask——异步任务 个人认为这是翻译比较好的一次.. Class Overview//类概述 AsyncTask enables proper and easy use of th ...
- Android英文文档翻译系列(2)——HandlerThread
public class HandlerThread extends Thread Class Overview Handy class for starting a new threa ...
- (android高仿系列)今日头条 --新闻阅读器 (三) 完结 、总结 篇
从写第一篇今日头条高仿系列开始,到现在已经过去了1个多月了,其实大体都做好了,就是迟迟没有放出来,因为我觉得,做这个东西也是有个过程的,我想把这个模仿中一步一步学习的过程,按照自己的思路写下来,在根据 ...
- (android高仿系列)今日头条 --新闻阅读器 (二)
高仿今日头条 --- 第一篇:(android高仿系列)今日头条 --新闻阅读器 (一) 上次,已经完毕了头部新闻分类栏目的拖动效果. 这篇文章是继续去完好APP 今日头条 这个新闻阅读器的其 ...
- Android进阶——多线程系列之Thread、Runnable、Callable、Future、FutureTask
多线程一直是初学者最抵触的东西,如果你想进阶的话,那必须闯过这道难关,特别是多线程中Thread.Runnable.Callable.Future.FutureTask这几个类往往是初学者容易搞混的. ...
- Android提升篇系列:Activity recreate(Activity 重新创建/自我恢复)机制(一)
注:本文中的recreate是指当内存不足时,Activity被回收,但再次来到此Activity时,系统重新恢复的过程.例如:当Activity A到Activity B时,如果内存不足,A被回收, ...
随机推荐
- ssh 移植记录
利用buildroot 先编译一个 sshd cd buildroot-2016.05/ make menuconfig Target packages ---> Networking appl ...
- linux中hive无法使用删除键或无反应
用的工具secureCRT连接linux服务器的,登录到hive中后无法使用删除键. 修改如下: 会话选项 -> 终端|仿真 -> 选择终端为linux.
- 使用DroneKit控制无人机
DroneKit-Python是一个用于控制无人机的Python库.DroneKit提供了用于控制无人机的API,其代码独立于飞控,单独运行在机载电脑(Companion Computer)或其他设备 ...
- 二、Linux 静态IP,动态IP配置
Linux 静态IP,动态IP配置 第一步:激活网卡 系统装好后默认的网卡是eth0,用下面的命令将这块网卡激活. # ifconfig eth0 up 第二步:设置网卡进入系统时启动 想要每次开机就 ...
- ddddddd
尊敬的老师们: 我在各方面表现优异.在学习方面,始终将学习放在首位,学习成绩名列前茅,在以往考试中从没有挂科记录,并积极参加校内.校外比赛,且多次获奖:在思想方面,积极向党组织靠拢,一直以一名优秀党员 ...
- eclipse新建python项Project interpreter not specified
安装好pydev后新建python项目时提示”Project interpreter not specified“的错误,这是因为没有导入python开发环境所致 解决方法如下:1.找到eclipse ...
- daterangepicker 使用方法总结
daterangepicker 是一个时间段选择插件.官网地址:http://www.daterangepicker.com/ 项目中需要实现如下图的效果: 1.引入该插件所需要的JS 和 CSS , ...
- SSH远程登录其他机器
常用格式:ssh [-l login_name] [-p port] [user@]hostname更详细的可以用ssh -h查看. 不指定用户: ssh 192.168.0.11 指定用户: ssh ...
- PHP 正则表达式 及常用汇总
Δ 定界符 Δ 字符域 Δ 修饰符 Δ 限定符 Δ 脱字符 Δ 通配符(正向预查,反向预查) Δ 反向引用 Δ 惰性匹配 Δ 注释 Δ 零字符宽 1. 平时做网站经常 ...
- e657. 用直线和曲线绘制图形
GeneralPath shape = new GeneralPath(); shape.moveTo(x, y); shape.lineTo(x, y); shape.quadTo(controlP ...