AndroLua+实现悬浮窗
androlua吧
全部回复
仅看楼主
level 9
nirenr 楼主
require "import"
import "android.widget.*"
import "android.view.*"
import "android.content.*"
import "android.graphics.*"
layout={
TextView,
id="tv",
textSize=20,
text="AndroLua+",
background="#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 9
nirenr 楼主
效果如图,点击消失
2015年07月22日 08点07分 2
level 1
[真棒][大拇指]
2015年09月13日 02点09分 3
level 11
运行错误
2015年09月13日 14点09分 4
复制有问题
2015年09月13日 15点09分
level 3
怎么弄运行错误,
2016年02月03日 18点02分 5
什么错误,去群下载源码吧
2016年02月04日 01点02分
level 4
请问楼主,要怎么用
2016年03月12日 01点03分 8
加官方群
2016年03月12日 10点03分
回复 nirenr :群号多少
2016年03月12日 16点03分
level 5
呃呃
2016年03月12日 13点03分 9
level 5
好东西
2016年03月12日 13点03分 10
level 9

2016年03月13日 01点03分 11
真是那里都有你啊
2016年05月02日 07点05分
level 4
放在那
2017年04月03日 15点04分 12
1