找回密码
 立即注册
悬浮floatingfunction功能 | android开发 2022-10-29 67 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
不认识有没有童鞋用过QQ的Android版本中的一个高清版本,当你退出QQ的时候,会在你的屏幕上呈现一个QQ图标的悬浮窗,就和PC上的迅雷的悬浮窗口一样,在一切使用的最上层,正本这个功能感觉仍是挺好的。今日就来为大家简单介绍下这个悬浮窗的实现方法吧,不过记住至少仍是给用户做一个隐藏掉这个悬浮窗的功能吧!其实实现原理仍是挺简单的,就是使用WindowManager将你的图标View增加到窗口中,不认识大家认识WindowManager.LayoutParams中有一个type属性不,这里玄机挺大的,找了良久,总算给我试出来有一个TYPE_PHONE可以来实现这个功能的,该类型提供与用户交互,置于一切使用程序上方,但是在状态栏后边。至于其他的类型,大家仍是去找API或许GG吧。
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\activity\TopFloatMain.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\service\TopFloatService$1.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\service\TopFloatService.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\util\MyApplication.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R$attr.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R$drawable.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R$id.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R$layout.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R$string.class
为你的使用增加悬浮窗功能\bin\classes\com\apkstory\R.class
为你的使用增加悬浮窗功能\bin\res\drawable-hdpi\ic_launcher.png
为你的使用增加悬浮窗功能\bin\res\drawable-ldpi\ic_launcher.png
为你的使用增加悬浮窗功能\bin\res\drawable-mdpi\ic_launcher.png
为你的使用增加悬浮窗功能\bin\classes.dex
为你的使用增加悬浮窗功能\bin\resources.ap_
为你的使用增加悬浮窗功能\bin\TopFloat.apk
为你的使用增加悬浮窗功能\gen\com\apkstory\R.java
为你的使用增加悬浮窗功能\res\drawable-hdpi\ic_launcher.png
为你的使用增加悬浮窗功能\res\drawable-ldpi\ic_launcher.png
为你的使用增加悬浮窗功能\res\drawable-mdpi\ic_launcher.png
为你的使用增加悬浮窗功能\res\layout\floating.xml
为你的使用增加悬浮窗功能\res\layout\main.xml
为你的使用增加悬浮窗功能\res\values\strings.xml
为你的使用增加悬浮窗功能\src\com\apkstory\activity\TopFloatMain.java
为你的使用增加悬浮窗功能\src\com\apkstory\service\TopFloatService.java
为你的使用增加悬浮窗功能\src\com\apkstory\util\MyApplication.java
为你的使用增加悬浮窗功能\.classpath
为你的使用增加悬浮窗功能\.project
为你的使用增加悬浮窗功能\AndroidManifest.xml
为你的使用增加悬浮窗功能\proguard.cfg

(I don't know whether children's shoes have ever used a high-definition version of the Android version of QQ. When you exit QQ, a floating window with QQ icon will appear on your screen, just like the Xunlei floating window on the PC. At the top of all uses, the original function is still very good. Let's briefly introduce the implementation method of this floating window for you today, but remember that at least it is still a function for users to hide this floating window! In fact, the implementation principle is still quite simple. It is to use WindowManager to add your icon View to the window There is a type attribute in LayoutParams. There is a big mystery here. After looking for it for a long time, I finally found a TYPE for me_ PHONE can realize this function. This type provides interaction with users and is placed above all user programs, but behind the status bar. As for other types, you should go to API or GG.
Add the floating window function for your use  bin  classes  com  apkstory  activity  TopFloatMain.class
Add the floating window function for your use  bin  classes  com  apkstory  service  TopFloatService $1.class
Add the floating window function for your use  bin  classes  com  apkstory  service  TopFloatService.class
Add the floating window function for your use  bin  classes  com  apkstory  util  MyApplication.class
Add the floating window function for your use  bin  classes  com  apkstory  R $attr.class
Add the floating window function for your use  bin  classes  com  apkstory  R $drawable.class
Add the floating window function for your use  bin  classes  com  apkstory  R $id.class
Add the floating window function for your use  bin  classes  com  apkstory  R $layout. class
Add the floating window function for your use  bin  classes  com  apkstory  R $string.class
Add the floating window function for your use  bin  classes  com  apkstory  R.class
Add the floating window function for your use  bin  res  drawable hdpi  ic_ launcher.png
Add the floating window function for your use  bin  res  drawable ldpi  ic_ launcher.png
Add the floating window function for your use  bin  res  drawable mdpi  ic_ launcher.png
Add the floating window function for your use  bin  classs.dex
Add the floating window function for your use  bin  resources.ap_
Add floating window function for your use  bin  TopFloat.apk
Add floating window function for your use  gen  com  apkstory  R.java
Add floating window function for your use  res  drawable hdpi  ic_ launcher.png
Add floating window function for your use  res  drawable ldpi  ic_ launcher.png
Add the floating window function for your use  res  drawable mdpi  ic_ launcher.png
Add the floating window function for your use  res  layout  floating. xml
Add the floating window function for your use  res  layout  main.xml
Add floating window function for your use  res  values  strings.xml
Add floating window function for your use  src  com  apkstory  activity  TopFloatMain.java
Add the floating window function for your use  src  com  apkstory  service  TopFloatService.java
Add the floating window function for your use  src  com  apkstory  util  MyApplication.java
Add floating window function for your use . classpath
Add floating window function for your use . Project
Add the floating window function for your use  AndroidManifest.xml
Add the floating window function for your use  proguard.cfg)

[下载]20551078605.rar




上一篇:天天动听 半透明Menu效果
下一篇:Android实现iphone风格的picker