PopupWindow的使用方法
来源:互联网 发布:jmeter相应数据 编辑:程序博客网 时间:2024/05/19 19:31
- public class popWindow extends Activity {
- /** Called when the activity is first created. */
-
- Button button_show;
- View contentView;
- PopupWindow pWindow;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.main);
-
- button_show=(Button)findViewById(R.id.show_popwindow);
- contentView=View.inflate(popWindow.this, R.layout.pwcontent, null);
-
- contentView.setBackgroundDrawable(getResources().getDrawable(R.drawable.fantasy_pictuer_06));
- contentView.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View v) {
- // TODO Auto-generated method stub
- pWindow.dismiss();
- }
- });
-
- pWindow=new PopupWindow(contentView);
- pWindow.setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-
- button_show.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View v) {
- // TODO Auto-generated method stub
-
- try {
-
- if(pWindow.isShowing())
- {
- pWindow.dismiss();
- }
-
- pWindow.showAsDropDown(v);
- pWindow.setFocusable(true);
-
-
- } catch (Exception e) {
- Toast.makeText(popWindow.this, e.getMessage(), Toast.LENGTH_SHORT);
- }
-
- }
- });
- }
-
-
- }
- PopupWindow的使用方法
- popupWindow 的使用方法
- popupWindow 的使用方法
- PopupWindow的基本使用方法
- PopupWindow的使用方法
- android popupwindow 的使用方法()
- Android中PopupWindow的使用方法
- PopUpWindow的使用方法及注意事项
- PopupWindow使用方法
- PopupWindow基本使用方法
- ASPxPopupControl PopupWindow使用方法
- PopupWindow基本使用方法
- Android PopupWindow使用方法小结
- PopupWindow+spinner使用方法
- Android PopupWindow使用方法小结
- Android PopupWindow的使用
- Android PopupWindow的使用
- Popupwindow遇到的问题
- 第5周实验报告任务3
- 你这个创业项目,如果腾讯跟进了,而且几乎是产品上完全复制,你会怎么办?
- JDeveloper初步:ADF Faces页面拖放
- 思考mysql内核之初级系列13---innodb的簇页管理
- CListBox 总是显示最新添加的一行 自动滚动 MFC
- PopupWindow的使用方法
- Pirate Town评测: 山寨Triple town?
- slow post ddos tools torshammer (win32可执行下载)
- 第五周任务1-3
- linux 关机 重启 注销 中断 命令
- Oracle数据库简单创建临时表空间并创建用户实现PlSql客户端登录
- 第五周上机任务---设计三角形类,增加构造函数--第三版V1.0
- 第五周 任务四
- 第五周实验报告1.3