首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android弹窗效果如何搞

2012-12-25 
android弹窗效果怎么搞本帖最后由 zhangle123 于 2012-11-12 18:35:02 编辑今天想搞一下类似魅族手机的弹

android弹窗效果怎么搞
本帖最后由 zhangle123 于 2012-11-12 18:35:02 编辑 今天想搞一下类似魅族手机的弹窗效果,但不是要完全类似,只要是弹窗窗口可以实现里面放指定的桌面快捷方式就可以了,说的不是很清楚,上图片

就是类似上面的,点击游戏桌面上的游戏可以弹出窗口,而且里面有图标,各位老大可以给点思路不?
[最优解释]
popupWindow, 这个可以搞定弹窗,还可以 很好的定位
[其他解释]
贴一段代码:


       LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        final ViewGroup menuView = (ViewGroup) mLayoutInflater.inflate(你的自资源文件id, null, true);
        mPopupWindow  = new PopupWindow(menuView, LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT, true);
        mPopupWindow.setBackgroundDrawable(new BitmapDrawable()); 
        mPopupWindow.setOutsideTouchable(true);
        mPopupWindow.setFocusable(true);


点击图标的时候mPopupWindow.showAsDropDown 或者 showAtLocation 即可。
[其他解释]
popwindow可以准确定位,showasLocation
[其他解释]
popupWindow
[其他解释]
不懂帮顶.................
[其他解释]
这个仿iphone的?

[其他解释]
引用:
popwindow可以准确定位,showasLocation

可以具体点不
[其他解释]
引用:
popupWindow
可以具体点不
[其他解释]
引用:
这个仿iphone的?
不是啊,就是公司要求的
[其他解释]
这个就是仿iphone的,哥哥你去玩下iphone
[其他解释]
引用:
贴一段代码:
Java code?1234567       LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);        final ViewGroup menuView = (ViewGroup) mLayoutI……


引用:
贴一段代码:
Java code?1234567       LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);        final ViewGroup menuView = (ViewGroup) mLayoutI……

恩,我的意思大致是这个意思,刚才找了一个例子测试了一下,可以,就是不晓得,是否可以不显示activity直接显示弹出窗口,自己再去试一下.你试过没有?
[其他解释]
引用:
popupWindow, 这个可以搞定弹窗,还可以 很好的定位

确认可以不显示activity,直接显示弹窗?
[其他解释]
引用:

这个就是仿iphone的,哥哥你去玩下iphone

我没有iphone,呵呵
[其他解释]
引用:
引用:贴一段代码:
Java code?1234567       LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);        final ViewGroup menuVie……

可以试试dialog形式的activity
[其他解释]
引用:
引用:引用:贴一段代码:
Java code?1234567       LayoutInflater mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);        ……

dialog不是弹窗吗?可以实现桌面不覆盖吗?

热点排行