├── app ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── xposed_init │ │ │ ├── up.png │ │ │ ├── back.png │ │ │ ├── down.png │ │ │ ├── light.png │ │ │ ├── ic_home.png │ │ │ ├── ic_image.png │ │ │ ├── ic_music.png │ │ │ ├── ic_next.png │ │ │ ├── ic_pause.png │ │ │ ├── ic_play.png │ │ │ ├── volume.png │ │ │ ├── alipay_qr.png │ │ │ ├── clear_mem.png │ │ │ ├── ic_command.png │ │ │ ├── screenoff.png │ │ │ ├── start_acts.png │ │ │ ├── wechat_qr.png │ │ │ ├── ic_clipboard.png │ │ │ ├── ic_nav_down.png │ │ │ ├── ic_previous.png │ │ │ ├── quick_notices.png │ │ │ ├── small_point.png │ │ │ ├── ic_sysbar_back.png │ │ │ ├── ic_sysbar_home.png │ │ │ ├── clear_notification.png │ │ │ ├── ic_sysbar_recent.png │ │ │ └── litepal.xml │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── up.png │ │ │ │ ├── ic_add.png │ │ │ │ ├── ic_app.png │ │ │ │ ├── ic_save.png │ │ │ │ ├── notice.png │ │ │ │ ├── alipay_qr.jpg │ │ │ │ ├── ic_close.png │ │ │ │ ├── wechat_qr.png │ │ │ │ ├── ic_add_black.png │ │ │ │ ├── small_point.png │ │ │ │ ├── ic_close_black.png │ │ │ │ ├── ic_down_black.png │ │ │ │ ├── ic_content_copy.png │ │ │ │ └── ic_remove_black.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── dimen.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── v_split_line.xml │ │ │ │ ├── a_quick_notification.xml │ │ │ │ ├── a_select_icon.xml │ │ │ │ ├── a_app_short_cut.xml │ │ │ │ ├── a_clipboard.xml │ │ │ │ ├── scanner_qr.xml │ │ │ │ ├── f_momo.xml │ │ │ │ ├── d_apps.xml │ │ │ │ ├── f_set_func.xml │ │ │ │ ├── quick_notice_dialog_layout.xml │ │ │ │ ├── d_clip.xml │ │ │ │ ├── a_manual.xml │ │ │ │ ├── d_icon_size.xml │ │ │ │ ├── d_navbar_height.xml │ │ │ │ ├── item_app.xml │ │ │ │ ├── d_taps.xml │ │ │ │ ├── d_custom_icon.xml │ │ │ │ ├── item_dialog_apps.xml │ │ │ │ ├── item_dialog_clip.xml │ │ │ │ ├── item_home.xml │ │ │ │ ├── item_momo.xml │ │ │ │ ├── a_home.xml │ │ │ │ └── v_short_panel.xml │ │ │ ├── menu │ │ │ │ ├── main_act_menu.xml │ │ │ │ ├── set_fun_act_menu.xml │ │ │ │ └── menu_home.xml │ │ │ └── values-w820dp │ │ │ │ └── dimens.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── egguncle │ │ │ │ └── xposednavigationbar │ │ │ │ ├── hook │ │ │ │ ├── hookFunc │ │ │ │ │ ├── LaunchAct.java │ │ │ │ │ ├── QuickNotification.java │ │ │ │ │ ├── NavClipboard.java │ │ │ │ │ ├── GoHomeNavBar.java │ │ │ │ │ ├── ClearBackground.java │ │ │ │ │ ├── StatusBarController.java │ │ │ │ │ ├── ScannerQRcode.java │ │ │ │ │ ├── StartActPanel.java │ │ │ │ │ ├── ScreenShot.java │ │ │ │ │ ├── ClearAllNotifications.java │ │ │ │ │ ├── ScreenOff.java │ │ │ │ │ ├── StartCommand.java │ │ │ │ │ ├── NavbarBaseClick.java │ │ │ │ │ ├── MusicController.java │ │ │ │ │ └── NavBarBtns.java │ │ │ │ ├── btnFunc │ │ │ │ │ ├── BtnScreenShot.java │ │ │ │ │ ├── BtnNavBarGoHome.java │ │ │ │ │ ├── BtnWeChatScanner.java │ │ │ │ │ ├── BtnQuickNotice.java │ │ │ │ │ ├── BtnBackLight.java │ │ │ │ │ ├── BtnVolume.java │ │ │ │ │ ├── BtnAlipayScanner.java │ │ │ │ │ ├── BtnLaunchActivity.java │ │ │ │ │ ├── BtnScreenOff.java │ │ │ │ │ ├── BtnStartCommand.java │ │ │ │ │ ├── BtnOpenActPanel.java │ │ │ │ │ ├── BtnMusicController.java │ │ │ │ │ ├── BtnNavClipboard.java │ │ │ │ │ ├── BtnsNavbar.java │ │ │ │ │ ├── BtnClearAllNotifications.java │ │ │ │ │ ├── BtnClearBackground.java │ │ │ │ │ └── MusicControllerPanel.java │ │ │ │ ├── util │ │ │ │ │ ├── XpNavbarThreadPool.java │ │ │ │ │ ├── XpLog.java │ │ │ │ │ └── MyClipBoard.java │ │ │ │ └── hookutil │ │ │ │ │ ├── MoKeeUtil.java │ │ │ │ │ ├── PointerEventDispatcherHook.java │ │ │ │ │ ├── PhoneSatatusBarHook.java │ │ │ │ │ └── MainHookUtil.java │ │ │ │ ├── model │ │ │ │ ├── ShortCutData.java │ │ │ │ ├── Momo.java │ │ │ │ ├── AppInfo.java │ │ │ │ └── ShortCut.java │ │ │ │ ├── ui │ │ │ │ ├── activity │ │ │ │ │ ├── ManualActivity.java │ │ │ │ │ ├── BaseActivity.java │ │ │ │ │ └── ClipboardActivity.java │ │ │ │ ├── fragment │ │ │ │ │ ├── BaseFragment.java │ │ │ │ │ └── MomoFragment.java │ │ │ │ ├── touchHelper │ │ │ │ │ └── MyItemTouchHelper.java │ │ │ │ └── adapter │ │ │ │ │ ├── DialogClipAdapter.java │ │ │ │ │ └── RcvHomeAdapter.java │ │ │ │ ├── receiver │ │ │ │ └── XpNavbarCommandReceiver.java │ │ │ │ ├── util │ │ │ │ └── CodeToFuncName.java │ │ │ │ ├── constant │ │ │ │ └── XpNavBarAction.java │ │ │ │ └── MyApplication.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── egguncle │ │ │ └── xposednavigationbar │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── egguncle │ │ └── xposednavigationbar │ │ └── ExampleInstrumentedTest.java ├── xpnavbar-1.8.2.apk ├── xpnavbar-1.8.3.apk ├── xpnavbar-2.0.4.apk ├── xpnavbar-2.1.0.apk ├── xpnavbar-2.1.1.apk ├── xpnavbar-2.1.2.apk ├── xpnavbar-2.1.3.apk ├── xpnavbar-2.1.5.apk ├── xpnavbar-2.2.0.apk ├── xpnavbar-2.2.1.apk ├── xpnavbar-2.3.0.apk ├── xpnavbar-2.3.1.apk ├── xpnavbar-2.3.2.apk ├── xpnavbar-2.4.0.apk ├── xpnavbar-2.4.1.apk ├── xpnavbar-2.0.0-beta.apk ├── xpnavbar-2.0.1-beta.apk ├── xpnavbar-2.0.2-beta.apk ├── xpnavbar-2.0.3-beta.apk ├── xpnavbar-debug-2.4.0.apk ├── build.gradle └── proguard-rules.pro ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .idea ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml └── misc.xml ├── settings.gradle ├── gradle.properties ├── ChangeLog.md └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.egguncle.xposednavigationbar.hook.hookutil.MainHookUtil -------------------------------------------------------------------------------- /app/xpnavbar-1.8.2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-1.8.2.apk -------------------------------------------------------------------------------- /app/xpnavbar-1.8.3.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-1.8.3.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.0.4.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.0.4.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.1.0.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.1.0.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.1.1.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.1.1.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.1.2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.1.2.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.1.3.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.1.3.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.1.5.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.1.5.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.2.0.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.2.0.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.2.1.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.2.1.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.3.0.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.3.0.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.3.1.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.3.1.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.3.2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.3.2.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.4.0.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.4.0.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.4.1.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.4.1.apk -------------------------------------------------------------------------------- /app/src/main/assets/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/up.png -------------------------------------------------------------------------------- /app/xpnavbar-2.0.0-beta.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.0.0-beta.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.0.1-beta.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.0.1-beta.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.0.2-beta.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.0.2-beta.apk -------------------------------------------------------------------------------- /app/xpnavbar-2.0.3-beta.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-2.0.3-beta.apk -------------------------------------------------------------------------------- /app/src/main/assets/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/back.png -------------------------------------------------------------------------------- /app/src/main/assets/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/down.png -------------------------------------------------------------------------------- /app/src/main/assets/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/light.png -------------------------------------------------------------------------------- /app/xpnavbar-debug-2.4.0.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/xpnavbar-debug-2.4.0.apk -------------------------------------------------------------------------------- /app/src/main/assets/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_home.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_image.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_music.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_next.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_pause.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_play.png -------------------------------------------------------------------------------- /app/src/main/assets/volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/volume.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/up.png -------------------------------------------------------------------------------- /app/src/main/assets/alipay_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/alipay_qr.png -------------------------------------------------------------------------------- /app/src/main/assets/clear_mem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/clear_mem.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_command.png -------------------------------------------------------------------------------- /app/src/main/assets/screenoff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/screenoff.png -------------------------------------------------------------------------------- /app/src/main/assets/start_acts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/start_acts.png -------------------------------------------------------------------------------- /app/src/main/assets/wechat_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/wechat_qr.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/ic_clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_clipboard.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_nav_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_nav_down.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_previous.png -------------------------------------------------------------------------------- /app/src/main/assets/quick_notices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/quick_notices.png -------------------------------------------------------------------------------- /app/src/main/assets/small_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/small_point.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_app.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_save.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/notice.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_sysbar_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_sysbar_back.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_sysbar_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_sysbar_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/alipay_qr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/alipay_qr.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/wechat_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/wechat_qr.png -------------------------------------------------------------------------------- /app/src/main/assets/clear_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/clear_notification.png -------------------------------------------------------------------------------- /app/src/main/assets/ic_sysbar_recent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/assets/ic_sysbar_recent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_add_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/small_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/small_point.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_close_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_down_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_down_black.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_content_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_content_copy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/drawable/ic_remove_black.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EggUncle/XposedNavigationBar/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | include ':app' 20 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimen.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 50dp 22 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Navigation bar function expansion module 3 | # Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | 19 | #Fri Jun 02 14:23:59 CST 2017 20 | distributionBase=GRADLE_USER_HOME 21 | distributionPath=wrapper/dists 22 | zipStoreBase=GRADLE_USER_HOME 23 | zipStorePath=wrapper/dists 24 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/v_split_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/a_quick_notification.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/a_select_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main_act_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | #3F51B5 22 | #303F9F 23 | #FF4081 24 | #00ffffff 25 | 26 | #e0e0e0 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/a_app_short_cut.xml: -------------------------------------------------------------------------------- 1 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/litepal.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/a_clipboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 23 | 64dp 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/LaunchAct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | 23 | /** 24 | * Created by egguncle on 17-6-10. 25 | */ 26 | 27 | public interface LaunchAct { 28 | /** 29 | * 启动其他app 30 | * 31 | * @param context 32 | * @param pkgName 对应app的包名 33 | */ 34 | void launchActivity(Context context, String pkgName); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/menu/set_fun_act_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnScreenShot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | 23 | import com.egguncle.xposednavigationbar.hook.hookFunc.ScreenShot; 24 | 25 | 26 | /** 27 | * Created by egguncle on 17-6-18. 28 | */ 29 | 30 | public class BtnScreenShot extends ScreenShot { 31 | 32 | @Override 33 | public void screenshot(Context context) { 34 | context.sendBroadcast(intent); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scanner_qr.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 23 | 24 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/model/ShortCutData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.model; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * Created by egguncle on 17-6-8. 26 | */ 27 | 28 | public class ShortCutData { 29 | private ArrayList data; 30 | 31 | public ArrayList getData() { 32 | return data; 33 | } 34 | 35 | public void setData(ArrayList data) { 36 | this.data = data; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/f_momo.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 23 | 29 | -------------------------------------------------------------------------------- /app/src/test/java/com/egguncle/xposednavigationbar/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar; 20 | 21 | import org.junit.Test; 22 | 23 | import static org.junit.Assert.*; 24 | 25 | /** 26 | * Example local unit test, which will execute on the development machine (host). 27 | * 28 | * @see Testing documentation 29 | */ 30 | public class ExampleUnitTest { 31 | @Test 32 | public void addition_isCorrect() throws Exception { 33 | assertEquals(4, 2 + 2); 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/QuickNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-10. 26 | */ 27 | 28 | public abstract class QuickNotification extends NavbarBaseClick { 29 | 30 | protected abstract void quickNotification(Context context); 31 | 32 | @Override 33 | void onBaseClick(View v) { 34 | quickNotification(v.getContext()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_apps.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 25 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/NavClipboard.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-23. 26 | */ 27 | 28 | public abstract class NavClipboard extends NavbarBaseClick { 29 | protected abstract void getClipboadrData(Context context); 30 | 31 | protected abstract void showClipboardData(); 32 | 33 | @Override 34 | void onBaseClick(View v) { 35 | getClipboadrData(v.getContext()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/f_set_func.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/quick_notice_dialog_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 25 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_clip.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 27 | 28 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnNavBarGoHome.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.support.v4.view.ViewPager; 22 | import android.view.View; 23 | 24 | import com.egguncle.xposednavigationbar.hook.hookFunc.GoHomeNavBar; 25 | 26 | /** 27 | * Created by egguncle on 17-6-10. 28 | */ 29 | 30 | public class BtnNavBarGoHome extends GoHomeNavBar { 31 | public BtnNavBarGoHome(ViewPager viewPager) { 32 | super(viewPager); 33 | } 34 | 35 | @Override 36 | protected void goHomeNavBar(ViewPager viewPager) { 37 | viewPager.setCurrentItem(1); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/GoHomeNavBar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.support.v4.view.ViewPager; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-10. 26 | */ 27 | 28 | public abstract class GoHomeNavBar extends NavbarBaseClick { 29 | private ViewPager mViewPager; 30 | 31 | protected abstract void goHomeNavBar(ViewPager viewPager); 32 | 33 | public GoHomeNavBar(ViewPager viewPager) { 34 | mViewPager = viewPager; 35 | } 36 | 37 | @Override 38 | void onBaseClick(View v) { 39 | goHomeNavBar(mViewPager); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/ClearBackground.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-10. 26 | */ 27 | 28 | public abstract class ClearBackground extends NavbarBaseClick{ 29 | /** 30 | * 清理后台 systemuiapplication这个进程没有killbrakground的权限 31 | * ,去启动透明activity并执行这个方法了 32 | * 33 | * @param context 34 | */ 35 | protected abstract void clearBackground(Context context); 36 | 37 | @Override 38 | void onBaseClick(View v) { 39 | clearBackground(v.getContext()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/a_manual.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 27 | 28 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/model/Momo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.model; 20 | 21 | import org.litepal.crud.DataSupport; 22 | 23 | import java.util.Date; 24 | 25 | /** 26 | * Created by egguncle on 17-6-18. 27 | * 快捷备忘历史记录的类 28 | */ 29 | 30 | public class Momo extends DataSupport{ 31 | private String content; 32 | private Date date; 33 | 34 | public String getContent() { 35 | return content; 36 | } 37 | 38 | public void setContent(String content) { 39 | this.content = content; 40 | } 41 | 42 | public Date getDate() { 43 | return date; 44 | } 45 | 46 | public void setDate(Date date) { 47 | this.date = date; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/StatusBarController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-10. 26 | */ 27 | 28 | public abstract class StatusBarController extends NavbarBaseClick { 29 | 30 | protected abstract void expandAllStatusBar(Context context); 31 | 32 | protected abstract void expandAllStatusBarWithOutRoot(Context context); 33 | 34 | protected abstract void expandStatusBar(Context context); 35 | 36 | protected abstract boolean requestRoot(); 37 | 38 | @Override 39 | void onBaseClick(View v) { 40 | expandAllStatusBar(v.getContext()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_icon_size.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 25 | 26 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnWeChatScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | 23 | import com.egguncle.xposednavigationbar.hook.hookFunc.ScannerQRcode; 24 | 25 | import java.io.IOException; 26 | 27 | /** 28 | * Created by egguncle on 17-6-16. 29 | */ 30 | 31 | public class BtnWeChatScanner extends ScannerQRcode{ 32 | 33 | @Override 34 | public void scanQR(Context context) { 35 | String cmd="am start -n com.tencent.mm/com.tencent.mm.plugin.scanner.ui.BaseScanUI"; 36 | try { 37 | Process p = Runtime.getRuntime().exec(cmd); 38 | } catch (IOException e) { 39 | e.printStackTrace(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/ScannerQRcode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | import com.egguncle.xposednavigationbar.hook.util.XpNavbarThreadPool; 25 | 26 | /** 27 | * Created by egguncle on 17-6-16. 28 | * 扫描二维码 29 | */ 30 | 31 | public abstract class ScannerQRcode extends NavbarBaseClick { 32 | protected abstract void scanQR(Context context); 33 | 34 | @Override 35 | void onBaseClick(final View v) { 36 | XpNavbarThreadPool.getInstance().execute(new Runnable() { 37 | @Override 38 | public void run() { 39 | scanQR(v.getContext()); 40 | } 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/util/XpNavbarThreadPool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.util; 20 | 21 | import java.util.concurrent.LinkedBlockingDeque; 22 | import java.util.concurrent.ThreadPoolExecutor; 23 | import java.util.concurrent.TimeUnit; 24 | 25 | /** 26 | * Created by egguncle on 17-10-15. 27 | */ 28 | 29 | public class XpNavbarThreadPool extends ThreadPoolExecutor { 30 | private static XpNavbarThreadPool instance = new XpNavbarThreadPool(5); 31 | 32 | private XpNavbarThreadPool(int corePoolSize) { 33 | super(corePoolSize, Integer.MAX_VALUE, 5, TimeUnit.SECONDS, new LinkedBlockingDeque()); 34 | } 35 | 36 | public static XpNavbarThreadPool getInstance() { 37 | return instance; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_navbar_height.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 25 | 26 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/ui/activity/ManualActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.ui.activity; 20 | 21 | import android.support.v7.app.ActionBar; 22 | 23 | import com.egguncle.xposednavigationbar.R; 24 | 25 | public class ManualActivity extends BaseActivity { 26 | 27 | @Override 28 | int getLayoutId() { 29 | return R.layout.a_manual; 30 | } 31 | 32 | @Override 33 | void initView() { 34 | ActionBar actionBar = getSupportActionBar(); 35 | actionBar.setTitle(getResources().getString(R.string.about_manual)); 36 | actionBar.setDisplayHomeAsUpEnabled(true); 37 | 38 | } 39 | 40 | @Override 41 | void initVar() { 42 | 43 | } 44 | 45 | @Override 46 | void initAction() { 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/StartActPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | /** 25 | * Created by egguncle on 17-6-11. 26 | */ 27 | 28 | public abstract class StartActPanel extends NavbarBaseClick { 29 | private static boolean open; 30 | 31 | protected abstract void openActPanel(Context context); 32 | 33 | protected abstract void closeActPanel(Context context); 34 | 35 | @Override 36 | void onBaseClick(View v) { 37 | if (open) { 38 | closeActPanel(v.getContext()); 39 | open = false; 40 | } else { 41 | openActPanel(v.getContext()); 42 | open = true; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnQuickNotice.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | 24 | import com.egguncle.xposednavigationbar.hook.hookFunc.QuickNotification; 25 | 26 | import static com.egguncle.xposednavigationbar.constant.XpNavBarAction.ACTION_QUICK_NOTICE; 27 | 28 | /** 29 | * Created by egguncle on 17-6-10. 30 | */ 31 | 32 | public class BtnQuickNotice extends QuickNotification{ 33 | @Override 34 | protected void quickNotification(Context context) { 35 | Intent intent = new Intent(ACTION_QUICK_NOTICE); 36 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 37 | context.startActivity(intent); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/ui/activity/BaseActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.ui.activity; 20 | 21 | import android.os.Bundle; 22 | import android.support.annotation.Nullable; 23 | import android.support.v7.app.AppCompatActivity; 24 | 25 | /** 26 | * Created by egguncle on 17-6-4. 27 | */ 28 | 29 | public abstract class BaseActivity extends AppCompatActivity { 30 | @Override 31 | public void onCreate(@Nullable Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(getLayoutId()); 34 | 35 | initView(); 36 | initVar(); 37 | initAction(); 38 | } 39 | 40 | abstract int getLayoutId(); 41 | abstract void initView(); 42 | abstract void initVar(); 43 | abstract void initAction(); 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnBackLight.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.os.PowerManager; 23 | 24 | import com.egguncle.xposednavigationbar.hook.hookFunc.LightAndVolumeController; 25 | 26 | import de.robv.android.xposed.XposedHelpers; 27 | 28 | /** 29 | * Created by egguncle on 17-6-10. 30 | */ 31 | 32 | public class BtnBackLight extends LightAndVolumeController { 33 | 34 | public BtnBackLight() { 35 | super(LightAndVolumeController.LIGHT); 36 | } 37 | 38 | @Override 39 | protected void control(Context context, int value) { 40 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 41 | XposedHelpers.callMethod(pm,"setBacklightBrightness",value); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnVolume.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.media.AudioManager; 23 | 24 | import com.egguncle.xposednavigationbar.hook.hookFunc.LightAndVolumeController; 25 | 26 | /** 27 | * Created by egguncle on 17-6-10. 28 | */ 29 | 30 | public class BtnVolume extends LightAndVolumeController { 31 | public BtnVolume(){ 32 | super(LightAndVolumeController.VOLUME); 33 | } 34 | 35 | @Override 36 | protected void control(Context context, int value) { 37 | AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); 38 | //调整媒体声言,不播放声言也不振动 39 | am.setStreamVolume(AudioManager.STREAM_MUSIC, value, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 4dp 21 | 8dp 22 | 16dp 23 | 20dp 24 | 16dp 25 | 16sp 26 | 40dp 27 | 20dp 28 | 60dp 29 | 400dp 30 | 50dp 31 | 32 | 16dp 33 | 16dp 34 | 8dp 35 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Navigation bar function expansion module 3 | # Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | 19 | ## Project-wide Gradle settings. 20 | # 21 | # For more details on how to configure your build environment visit 22 | # http://www.gradle.org/docs/current/userguide/build_environment.html 23 | # 24 | # Specifies the JVM arguments used for the daemon process. 25 | # The setting is particularly useful for tweaking memory settings. 26 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 27 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 28 | # 29 | # When configured, Gradle will run in incubating parallel mode. 30 | # This option should only be used with decoupled projects. More details, visit 31 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 32 | # org.gradle.parallel=true 33 | #Fri Jun 02 14:24:04 CST 2017 34 | systemProp.http.proxyHost=127.0.0.1 35 | org.gradle.jvmargs=-Xmx1536m 36 | systemProp.http.proxyPort=1080 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/ScreenShot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.view.View; 24 | 25 | import com.egguncle.xposednavigationbar.constant.ConstantStr; 26 | import com.egguncle.xposednavigationbar.constant.XpNavBarAction; 27 | 28 | 29 | /** 30 | * Created by egguncle on 17-6-18. 31 | */ 32 | 33 | public abstract class ScreenShot extends NavbarBaseClick { 34 | protected Intent intent; 35 | 36 | protected abstract void screenshot(Context context); 37 | 38 | public ScreenShot() { 39 | intent = new Intent(XpNavBarAction.ACTION_PHONE_WINDOW_MANAGER); 40 | intent.putExtra(ConstantStr.TYPE, ConstantStr.TAKE_SCREENSHOT); 41 | } 42 | 43 | @Override 44 | void onBaseClick(View v) { 45 | screenshot(v.getContext()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_app.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 26 | 27 | 33 | 34 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/egguncle/xposednavigationbar/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar; 20 | 21 | import android.content.Context; 22 | import android.support.test.InstrumentationRegistry; 23 | import android.support.test.runner.AndroidJUnit4; 24 | 25 | import org.junit.Test; 26 | import org.junit.runner.RunWith; 27 | 28 | import static org.junit.Assert.*; 29 | 30 | /** 31 | * Instrumentation test, which will execute on an Android device. 32 | * 33 | * @see Testing documentation 34 | */ 35 | @RunWith(AndroidJUnit4.class) 36 | public class ExampleInstrumentedTest { 37 | @Test 38 | public void useAppContext() throws Exception { 39 | // Context of the app under test. 40 | Context appContext = InstrumentationRegistry.getTargetContext(); 41 | 42 | assertEquals("com.egguncle.xposednavigationbar", appContext.getPackageName()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/ClearAllNotifications.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.view.View; 24 | 25 | import com.egguncle.xposednavigationbar.constant.ConstantStr; 26 | import com.egguncle.xposednavigationbar.constant.XpNavBarAction; 27 | 28 | /** 29 | * Created by egguncle on 17-6-10. 30 | */ 31 | 32 | public abstract class ClearAllNotifications extends NavbarBaseClick { 33 | 34 | protected abstract void clearAllNotifications(Context context); 35 | 36 | protected Intent intent; 37 | 38 | public ClearAllNotifications() { 39 | intent = new Intent(XpNavBarAction.ACTION_PHONE_STATUSBAR); 40 | intent.putExtra(ConstantStr.TYPE, ConstantStr.CLEAR_NOTIFICATIONS); 41 | } 42 | 43 | @Override 44 | void onBaseClick(View v) { 45 | clearAllNotifications(v.getContext()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookutil/MoKeeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2018 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookutil; 20 | 21 | import de.robv.android.xposed.XC_MethodReplacement; 22 | import de.robv.android.xposed.XposedHelpers; 23 | 24 | /** 25 | * Created by songyucheng on 2018/1/18. 26 | */ 27 | 28 | public class MoKeeUtil { 29 | 30 | public static void hook(ClassLoader classLoader) throws Throwable { 31 | try { 32 | final Class slideTouchEvent = 33 | classLoader.loadClass("com.android.systemui.singlehandmode.SlideTouchEvent"); 34 | XposedHelpers.findAndHookMethod(slideTouchEvent, "isSupportSingleHand", new XC_MethodReplacement() { 35 | @Override 36 | protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { 37 | return false; 38 | } 39 | }); 40 | } catch (Exception e) { 41 | 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnAlipayScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.net.Uri; 24 | 25 | import com.egguncle.xposednavigationbar.hook.hookFunc.ScannerQRcode; 26 | import com.egguncle.xposednavigationbar.hook.util.XpLog; 27 | 28 | 29 | /** 30 | * Created by egguncle on 17-6-16. 31 | */ 32 | 33 | public class BtnAlipayScanner extends ScannerQRcode { 34 | 35 | @Override 36 | public void scanQR(final Context context) { 37 | try { 38 | Uri uri = Uri.parse("alipayqr://platformapi/startapp?saId=10000007"); 39 | Intent intent = new Intent(Intent.ACTION_VIEW, uri); 40 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 41 | context.startActivity(intent); 42 | } catch (Exception e) { 43 | XpLog.i(e.getMessage()); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/ScreenOff.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | import com.egguncle.xposednavigationbar.hook.util.XpNavbarThreadPool; 25 | 26 | /** 27 | * Created by egguncle on 17-6-10. 28 | */ 29 | 30 | public abstract class ScreenOff extends NavbarBaseClick implements View.OnLongClickListener { 31 | 32 | protected abstract void screenOff(Context context); 33 | 34 | protected abstract void showPowerMenu(Context context); 35 | 36 | @Override 37 | void onBaseClick(View v) { 38 | screenOff(v.getContext()); 39 | } 40 | 41 | @Override 42 | public boolean onLongClick(final View v) { 43 | XpNavbarThreadPool.getInstance().execute(new Runnable() { 44 | @Override 45 | public void run() { 46 | showPowerMenu(v.getContext()); 47 | } 48 | }); 49 | return true; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/util/XpLog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.util; 20 | 21 | import de.robv.android.xposed.XposedBridge; 22 | 23 | import static com.egguncle.xposednavigationbar.BuildConfig.DEBUG; 24 | 25 | /** 26 | * Created by egguncle on 17-8-23. 27 | */ 28 | 29 | public class XpLog { 30 | 31 | private final static String TAG = "XpNavbar"; 32 | 33 | public static void i(String logContent) { 34 | if (DEBUG) 35 | XposedBridge.log("[I/" + TAG + "] " + logContent); 36 | } 37 | 38 | public static void e(String logContent) { 39 | if (DEBUG) 40 | XposedBridge.log("[E/" + TAG + "] " + logContent); 41 | } 42 | 43 | public static void e(Throwable e) { 44 | if (DEBUG) 45 | XposedBridge.log("[E/" + TAG + "] " + e.getMessage()); 46 | } 47 | 48 | public static void w(String logContent) { 49 | if (DEBUG) 50 | XposedBridge.log("[W/" + TAG + "] " + logContent); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/StartCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.view.View; 23 | 24 | import com.egguncle.xposednavigationbar.hook.util.XpLog; 25 | import com.egguncle.xposednavigationbar.hook.util.XpNavbarThreadPool; 26 | 27 | /** 28 | * Created by egguncle on 17-6-25. 29 | */ 30 | 31 | public abstract class StartCommand extends NavbarBaseClick { 32 | private String mCommand; 33 | 34 | protected abstract void startCommand(String command,Context context); 35 | 36 | public StartCommand(String command) { 37 | mCommand = command; 38 | XpLog.i(command+"----"); 39 | } 40 | 41 | @Override 42 | void onBaseClick(final View v) { 43 | XpNavbarThreadPool.getInstance().execute(new Runnable() { 44 | @Override 45 | public void run() { 46 | startCommand(mCommand,v.getContext()); 47 | } 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_taps.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 29 | 36 | 37 | 38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/ui/fragment/BaseFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.ui.fragment; 20 | 21 | 22 | import android.os.Bundle; 23 | import android.support.annotation.Nullable; 24 | import android.support.v4.app.Fragment; 25 | import android.view.LayoutInflater; 26 | import android.view.View; 27 | import android.view.ViewGroup; 28 | 29 | /** 30 | * Created by egguncle on 17-8-11. 31 | */ 32 | 33 | public abstract class BaseFragment extends Fragment { 34 | 35 | abstract void initView(View view); 36 | abstract void initAction(); 37 | abstract void initVar(); 38 | abstract int getLayoutId(); 39 | 40 | private View rootView; 41 | 42 | @Nullable 43 | @Override 44 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { 45 | rootView=inflater.inflate(getLayoutId(),container,false); 46 | initView(rootView); 47 | initVar(); 48 | initAction(); 49 | return rootView; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/d_custom_icon.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 23 | 24 | 31 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_dialog_apps.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 25 | 26 | 32 | 33 | 38 | 39 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/receiver/XpNavbarCommandReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2018 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.receiver; 20 | 21 | import android.content.BroadcastReceiver; 22 | import android.content.Context; 23 | import android.content.Intent; 24 | import android.util.Log; 25 | import android.widget.Toast; 26 | 27 | import static com.egguncle.xposednavigationbar.constant.ConstantStr.COMMAND_STR; 28 | 29 | public class XpNavbarCommandReceiver extends BroadcastReceiver { 30 | 31 | @Override 32 | public void onReceive(Context context, Intent intent) { 33 | 34 | String command = intent.getStringExtra(COMMAND_STR); 35 | try { 36 | Log.i("XpNavBar","startCommand: " + command); 37 | Process p = Runtime.getRuntime().exec(command); 38 | Toast.makeText(context,"run command success",Toast.LENGTH_SHORT).show(); 39 | } catch (Exception e) { 40 | e.printStackTrace(); 41 | Toast.makeText(context,"run command failed",Toast.LENGTH_SHORT).show(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_dialog_clip.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 28 | 29 | 37 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnLaunchActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | 22 | import android.content.Context; 23 | import android.content.Intent; 24 | import android.content.pm.PackageManager; 25 | import android.view.View; 26 | 27 | import com.egguncle.xposednavigationbar.hook.hookFunc.LaunchAct; 28 | 29 | /** 30 | * Created by egguncle on 17-6-10. 31 | */ 32 | 33 | public class BtnLaunchActivity implements LaunchAct, View.OnClickListener { 34 | private String mPkgName; 35 | 36 | public BtnLaunchActivity(String pkgName) { 37 | mPkgName = pkgName; 38 | } 39 | 40 | @Override 41 | public void onClick(final View view) { 42 | launchActivity(view.getContext(), mPkgName); 43 | } 44 | 45 | @Override 46 | public void launchActivity(Context context, String pkgName) { 47 | PackageManager packageManager = context.getPackageManager(); 48 | Intent intent = packageManager.getLaunchIntentForPackage(pkgName); 49 | context.startActivity(intent); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnScreenOff.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.app.Instrumentation; 22 | import android.content.Context; 23 | import android.os.PowerManager; 24 | import android.os.SystemClock; 25 | import android.view.KeyEvent; 26 | 27 | import com.egguncle.xposednavigationbar.hook.hookFunc.ScreenOff; 28 | 29 | import de.robv.android.xposed.XposedHelpers; 30 | 31 | /** 32 | * Created by egguncle on 17-6-10. 33 | */ 34 | 35 | public class BtnScreenOff extends ScreenOff{ 36 | 37 | @Override 38 | protected void screenOff(Context context) { 39 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 40 | XposedHelpers.callMethod(pm,"goToSleep",SystemClock.uptimeMillis()); 41 | } 42 | 43 | @Override 44 | protected void showPowerMenu(Context context) { 45 | Instrumentation mInst = new Instrumentation(); 46 | KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_POWER); 47 | mInst.sendKeySync(keyEvent); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnStartCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | import com.egguncle.xposednavigationbar.constant.ConstantStr; 26 | import com.egguncle.xposednavigationbar.hook.hookFunc.StartCommand; 27 | import com.egguncle.xposednavigationbar.hook.util.XpLog; 28 | 29 | import static com.egguncle.xposednavigationbar.constant.ConstantStr.COMMAND_STR; 30 | 31 | /** 32 | * Created by egguncle on 17-6-25. 33 | */ 34 | 35 | public class BtnStartCommand extends StartCommand { 36 | private Intent mIntent; 37 | 38 | public BtnStartCommand(String command) { 39 | super(command); 40 | mIntent = new Intent(); 41 | mIntent.setAction(ConstantStr.ACTION_COMMAND); 42 | } 43 | 44 | @Override 45 | protected void startCommand(String command, Context context) { 46 | mIntent.putExtra(COMMAND_STR, command); 47 | XpLog.i(command); 48 | context.sendBroadcast(mIntent); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_home.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 23 | 24 | 31 | 36 | 41 | 42 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/btnFunc/BtnOpenActPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.btnFunc; 20 | 21 | import android.content.Context; 22 | import android.content.Intent; 23 | 24 | import com.egguncle.xposednavigationbar.constant.XpNavBarAction; 25 | import com.egguncle.xposednavigationbar.hook.hookFunc.StartActPanel; 26 | 27 | import static com.egguncle.xposednavigationbar.constant.XpNavBarAction.ACTION_START_ACT; 28 | 29 | /** 30 | * Created by egguncle on 17-6-11. 31 | */ 32 | 33 | public class BtnOpenActPanel extends StartActPanel { 34 | 35 | @Override 36 | protected void openActPanel(Context context) { 37 | Intent intent = new Intent(ACTION_START_ACT); 38 | //使用这种启动标签,可以避免在打开软件本身以后再通过快捷键呼出备忘对话框时仍然显示软件的界面的bug 39 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 40 | context.startActivity(intent); 41 | } 42 | 43 | @Override 44 | protected void closeActPanel(Context context) { 45 | Intent intent = new Intent(); 46 | intent.setAction(XpNavBarAction.ACT_CLOSE_ACT_PANEL); 47 | context.sendBroadcast(intent); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/ui/touchHelper/MyItemTouchHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.ui.touchHelper; 20 | 21 | import android.support.v7.widget.helper.ItemTouchHelper; 22 | 23 | /** 24 | * Created by egguncle on 17-6-7. 25 | */ 26 | 27 | public class MyItemTouchHelper extends ItemTouchHelper { 28 | private MyItemTouchHelpCallBack itemTouchHelpCallback; 29 | 30 | public MyItemTouchHelper(MyItemTouchHelpCallBack.OnItemTouchCallbackListener onItemTouchCallbackListener) { 31 | super(new MyItemTouchHelpCallBack(onItemTouchCallbackListener)); 32 | // itemTouchHelpCallback = (MyItemTouchHelpCallBack) getCallback(); 33 | } 34 | 35 | // /** 36 | // * 设置是否可以被拖拽 37 | // * 38 | // * @param canDrag 是true,否false 39 | // */ 40 | // public void setDragEnable(boolean canDrag) { 41 | // itemTouchHelpCallback.setDragEnable(canDrag); 42 | // } 43 | // 44 | // /** 45 | // * 设置是否可以被滑动 46 | // * 47 | // * @param canSwipe 是true,否false 48 | // */ 49 | // public void setSwipeEnable(boolean canSwipe) { 50 | // itemTouchHelpCallback.setSwipeEnable(canSwipe); 51 | // } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/egguncle/xposednavigationbar/hook/hookFunc/NavbarBaseClick.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Navigation bar function expansion module 3 | * Copyright (C) 2017 egguncle cicadashadow@gmail.com 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.egguncle.xposednavigationbar.hook.hookFunc; 20 | 21 | import android.content.Context; 22 | import android.os.Vibrator; 23 | import android.view.View; 24 | 25 | import com.egguncle.xposednavigationbar.hook.hookutil.DataHook; 26 | import com.egguncle.xposednavigationbar.hook.hookutil.NavBarHook; 27 | import com.egguncle.xposednavigationbar.hook.util.XpLog; 28 | 29 | /** 30 | * Created by egguncle on 17-9-29. 31 | */ 32 | 33 | public abstract class NavbarBaseClick implements View.OnClickListener { 34 | private static Vibrator vibrator; 35 | 36 | abstract void onBaseClick(View v); 37 | 38 | @Override 39 | public void onClick(View v) { 40 | if (DataHook.vibrate) { 41 | if (vibrator == null) { 42 | Context context = v.getContext(); 43 | vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 44 | } 45 | vibrator.vibrate(10); 46 | } 47 | if (DataHook.goHomeAfterClick) { 48 | NavBarHook.getVpXpHook().setCurrentItem(1); 49 | } 50 | onBaseClick(v); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 35 | 36 | 42 | 43 |