文件名称:Android悬浮窗菜单FloatMenuSample.zip
文件大小:2.91MB
文件格式:ZIP
更新时间:2022-08-08 02:24:49
开源项目
Android 悬浮窗菜单,可在launcher或app中使用。示例代码:@Override public void onCreate() { super.onCreate(); mFloatMenu = new FloatMenu.Builder(this) .floatLoader(R.drawable.yw_anim_background) .floatLogo(R.drawable.yw_image_float_logo) .addMenuItem(android.R.color.transparent, R.drawable.yw_menu_account, Const.MENU_ITEMS[0], android.R.color.black, this) .addMenuItem(android.R.color.transparent, R.drawable.yw_menu_favour, Const.MENU_ITEMS[1], android.R.color.black, this) .addMenuItem(android.R.color.transparent, R.drawable.yw_menu_fb, Const.MENU_ITEMS[2], android.R.color.black, this) .addMenuItem(android.R.color.transparent, R.drawable.yw_menu_msg, Const.MENU_ITEMS[3], android.R.color.black, this) .addMenuItem(android.R.color.transparent, R.drawable.yw_menu_close, Const.MENU_ITEMS[4], android.R.color.black, this) .menuBackground(R.drawable.yw_menu_bg) .onMenuActionListner(this) .build(); mFloatMenu.show(); } public void showFloat() { if (mFloatMenu != null) mFloatMenu.show(); } public void hideFloat() { if (mFloatMenu != null) { mFloatMenu.hide(); } } public void destroyFloat() { hideFloat(); if (mFloatMenu != null) { mFloatMenu.destroy(); } mFloatMenu = null; } private void showRed() { if (!hasNewMsg) { mFloatMenu.changeLogo(R.drawable.yw_image_float_logo, R.drawable.yw_menu_msg, 3); } else { mFloatMenu.changeLogo(R.drawable.yw_image_float_logo_red, R.drawable.yw_menu_msg_red, 3); } }
【文件预览】:
FloatMenuSample-master
----gradlew(5KB)
----settings.gradle(45B)
----.idea()
--------misc.xml(1KB)
--------compiler.xml(686B)
--------gradle.xml(449B)
--------.name(15B)
--------encodings.xml(159B)
--------modules.xml(528B)
--------copyright()
--------vcs.xml(180B)
----FloatMenuDemo()
--------src()
--------.gitignore(7B)
--------build.gradle(763B)
--------proguard-rules.pro(691B)
----LICENSE(1KB)
----gradle()
--------wrapper()
----README.md(6KB)
----gradlew.bat(2KB)
----picture()
--------201605041543.gif(933KB)
--------floatmen.png(16KB)
--------201605031543.gif(364KB)
--------chinareadlogo.png(3KB)
--------floatmenu2.gif(852KB)
--------2016112315.gif(106KB)
--------201606161036.gif(652KB)
--------20160503125603.png(82KB)
----FloatMenu()
--------src()
--------.gitignore(7B)
--------build.gradle(3KB)
--------proguard-rules.pro(645B)
----gradle.properties(93B)
----.gitignore(65B)
----build.gradle(781B)