AndroLua+实现悬浮窗
aide吧
全部回复
仅看楼主
level 8
nirenr 楼主
require "import"
import "android.widget.*"
import "android.view.*"
import "android.content.*"
import "android.graphics.*"
layout={
TextView,
id="tv",
textSize=20,
text="AndroLua+",
backgroundColor="#88888888",
onClick="click"
}
function click(v)
wm.removeView(v)
print("已移除悬浮窗")
end
wm=activity.getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
lp=WindowManager.LayoutParams()
lp.format = PixelFormat.RGBA_8888
lp.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
lp.type=WindowManager.LayoutParams.TYPE_PHONE
lp.width=WindowManager.LayoutParams.WRAP_CONTENT
lp.height=WindowManager.LayoutParams.WRAP_CONTENT
wm.addView(loadlayout(layout),lp)
2015年07月22日 08点07分 1
level 8
nirenr 楼主
效果如图,点击消失
2015年07月22日 08点07分 2
level 8
nirenr 楼主
取色,找色,模拟触摸也基本上实现了
2015年07月22日 08点07分 3
level 13
厉害
2015年07月22日 09点07分 4
level 10
可以干嘛
2015年07月22日 12点07分 6
level 8
你来错了
2020年01月10日 04点01分 9
level 9
PopupWindow不香吗
2020年02月02日 14点02分 10
1