crosg / floatmenusample Goto Github PK
View Code? Open in Web Editor NEWandroid 悬浮窗菜单,可在launcher或app中使用
License: BSD 3-Clause "New" or "Revised" License
android 悬浮窗菜单,可在launcher或app中使用
License: BSD 3-Clause "New" or "Revised" License
import com.yw.game.floatmenu.customfloat.BaseFloatDialog;
不能导入,没有customfloat了。
能否在所有Activity保持可见呢
悬浮球打开怎么定时关闭啊
对于有代码洁癖的人简直了,单词很多都没拼对,建议规范一下会更好
可定制化太差,建议可以参考系统dialog的实现,别人用的时候需要大改;
1.增加拖动位置后的位置信息保存;以免影响下个页面使用;(如果在onPause中不 destoryFloat)
当有多个页面使用时,如果一个页面拖拽图标到了新的位置,但方法私有,也没有提供保存位置的方法,下一个页面打开时,其实还是原来的位置,而不是上个页面拖拽后的位置。
2.增加或设置关闭菜单列表的方法;
或设置openMenu() 方法为public,这样可在点击图标后,手动调用它,关闭图标列表,而不是还得再点击logo才能关闭。
我这边是一个sdk ,给游戏接入使用。然后开启悬浮窗,怎么样在Service 中开启呢?看demo 中没有相关代码....
public class MyFloatDialog extends BaseFloatDailog {
private Activity mContext;
public MyFloatDialog(Activity context) {
super(context);
this.mContext=context;
}
@Override
protected View getLeftView(LayoutInflater inflater, View.OnTouchListener touchListener) {
// ResourceUtil.getLayoutId(mContext,"layout_menu_left")
// int identifier = mContext.getResources().getIdentifier("layout_menu_left", "layout",
// mContext.getPackageName());
// Log.e(">>>>>>>>>>2>",identifier+">>1>>>");
Toast.makeText(mContext,"haha",Toast.LENGTH_SHORT).show();//报空指针,是因为没有上下文,是个空引用
View view = inflater.inflate(R.layout.layout_menu_left, null);
ImageView leftLogo = (ImageView) view.findViewById(R.id.logo);
leftLogo.setOnTouchListener(touchListener);
return view;
}
RT,需要根据不周结果,显示图标不同状态,例如音量小,中,大。请指教
小米手机,Android 8.0,用其它手机测正常
请问怎么才能让锁屏界面也可以显示呢
有没有一个直接调用显示logo的方法
锤子手机容易出现anr
桌面悬浮实现不了
下面的按钮都失去了点击效果了,怎么解决
1:按照demo使用只会在MainActivity内有效果,切换Activity没有效果
2:按照每个Activity都初始化一次,并不能共享浮动框的位置.
是我使用的方式不对吗...有啥好办法,我想让悬浮框出现在整个应用内,请问有什么好的处理方式吗
有没有什么方法可以在悬浮窗失去焦点的时候自动贴边呢?
感觉代码里的注释略少,有些地方看不懂。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.