实现从底部弹出或滑出选择菜单或窗口 android

来源:互联网 发布:微信自动营销软件 编辑:程序博客网 时间:2024/04/29 05:07

1.用popupWindow实现弹出菜单窗口

http://www.cnblogs.com/sw926/p/3230659.html

http://www.eoeandroid.com/forum.php?mod=viewthread&tid=10850&highlight=popup%2Bwindow


最简单的PopupWindow实例只要三个步骤就能完成:

1:将PopupWindow中的内容在xml中定义好,通过inflate赋给一个View:

View mView = factory.inflate(R.layout.pop, null);

(factory为我定义的LayoutInflater).


2:创建一个PopuoWindow: 

PopupWindow mPop = new PopupWindow(mView, 50, 90);


3:让PopuoWindow显示:

mPop.showAtLocation((View) v.getParent(), Gravity.TOP | Gravity.LEFT, 252, 50);




2.使用activity实现弹出滑动窗口或菜单

http://104zz.iteye.com/blog/1685425


3、使用dialog 实现弹出底部菜单对话框

http://www.cnblogs.com/djgzhiyong/archive/2013/04/18/3029067.html

0 0