├── EasyTouch
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── drawable
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── ball_1.png
│ │ │ │ │ ├── ball_10.png
│ │ │ │ │ ├── ball_11.png
│ │ │ │ │ ├── ball_12.png
│ │ │ │ │ ├── ball_13.png
│ │ │ │ │ ├── ball_14.png
│ │ │ │ │ ├── ball_15.png
│ │ │ │ │ ├── ball_16.png
│ │ │ │ │ ├── ball_17.png
│ │ │ │ │ ├── ball_18.png
│ │ │ │ │ ├── ball_19.png
│ │ │ │ │ ├── ball_2.png
│ │ │ │ │ ├── ball_20.png
│ │ │ │ │ ├── ball_21.png
│ │ │ │ │ ├── ball_22.png
│ │ │ │ │ ├── ball_23.png
│ │ │ │ │ ├── ball_3.png
│ │ │ │ │ ├── ball_4.png
│ │ │ │ │ ├── ball_5.png
│ │ │ │ │ ├── ball_6.png
│ │ │ │ │ ├── ball_7.png
│ │ │ │ │ ├── ball_8.png
│ │ │ │ │ ├── ball_9.png
│ │ │ │ │ ├── main_title.png
│ │ │ │ │ ├── main_title_ball.png
│ │ │ │ │ ├── main_title_linear.png
│ │ │ │ │ ├── mian_title_custom.png
│ │ │ │ │ ├── shape_react_bottom.xml
│ │ │ │ │ ├── shape_react_mid.xml
│ │ │ │ │ ├── shape_react_top.xml
│ │ │ │ │ ├── shape_react_corners_mid.xml
│ │ │ │ │ ├── shape_react_corners_bottom.xml
│ │ │ │ │ ├── shape_react_corners_top.xml
│ │ │ │ │ ├── shape_react_corners_top_menu_bg.xml
│ │ │ │ │ ├── shape_react_corners_top_bottom.xml
│ │ │ │ │ ├── ic_add.xml
│ │ │ │ │ ├── ic_home.xml
│ │ │ │ │ ├── ic_add_white_48dp.xml
│ │ │ │ │ ├── ic_arrow_left.xml
│ │ │ │ │ ├── ic_menu.xml
│ │ │ │ │ ├── ic_keyboard_arrow_left.xml
│ │ │ │ │ ├── ic_test.xml
│ │ │ │ │ ├── ic_add_gray.xml
│ │ │ │ │ ├── ic_arrwo_right.xml
│ │ │ │ │ ├── ic_warning.xml
│ │ │ │ │ ├── ic_arrow_back_white.xml
│ │ │ │ │ ├── vector_drawable_function_home.xml
│ │ │ │ │ ├── vector_drawable_function_back.xml
│ │ │ │ │ ├── vector_drawable_recent.xml
│ │ │ │ │ ├── ic_notifications.xml
│ │ │ │ │ ├── bg_linear_left.xml
│ │ │ │ │ ├── ball_0.xml
│ │ │ │ │ ├── bg_linear_rect_left.xml
│ │ │ │ │ ├── bg_linear_right.xml
│ │ │ │ │ ├── bg_linear_line_left_1.xml
│ │ │ │ │ ├── bg_linear_rect_right.xml
│ │ │ │ │ ├── bg_linear_line_right_1.xml
│ │ │ │ │ ├── vector_drawable_ball.xml
│ │ │ │ │ ├── ic_alarm.xml
│ │ │ │ │ ├── bg_linear_line_right_2.xml
│ │ │ │ │ ├── ic_notifications_off.xml
│ │ │ │ │ ├── bg_linear_line_left_2.xml
│ │ │ │ │ ├── ic_alarm_off.xml
│ │ │ │ │ ├── vector_drawable_previous.xml
│ │ │ │ │ ├── vector_drawable_function_previous.xml
│ │ │ │ │ ├── vector_drawable_function_notification.xml
│ │ │ │ │ ├── vector_drawable_back.xml
│ │ │ │ │ ├── vector_drawable_scan_alipay.xml
│ │ │ │ │ ├── vector_drawable_scan_weixin.xml
│ │ │ │ │ ├── vector_drawable_function_turn_pos.xml
│ │ │ │ │ ├── vector_drawable_app_menu.xml
│ │ │ │ │ ├── vector_drawable_function_pay.xml
│ │ │ │ │ ├── vector_drawable_lock.xml
│ │ │ │ │ ├── vector_drawable_function_shot.xml
│ │ │ │ │ ├── vector_drawable_function_menu.xml
│ │ │ │ │ ├── vector_drawable_pay_alipay.xml
│ │ │ │ │ ├── vector_drawable_pay.xml
│ │ │ │ │ ├── vector_drawable_voice_menu.xml
│ │ │ │ │ ├── vector_drawable_menu.xml
│ │ │ │ │ ├── vector_drawable_notification.xml
│ │ │ │ │ ├── vector_drawable_add_app.xml
│ │ │ │ │ ├── vector_drawable_trun_pos.xml
│ │ │ │ │ ├── ic_media_off.xml
│ │ │ │ │ ├── vector_drawable_screen_lock.xml
│ │ │ │ │ ├── vector_ball_menu_voice.xml
│ │ │ │ │ ├── vector_drawable_selection.xml
│ │ │ │ │ ├── ic_media.xml
│ │ │ │ │ ├── vector_drawable_shot.xml
│ │ │ │ │ ├── vector_drawable_home.xml
│ │ │ │ │ ├── vector_ball_menu_pay.xml
│ │ │ │ │ └── vector_ball_menu_apps.xml
│ │ │ │ ├── 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
│ │ │ │ ├── xml
│ │ │ │ │ ├── file_paths.xml
│ │ │ │ │ ├── device_admin.xml
│ │ │ │ │ └── accessibilityservice.xml
│ │ │ │ ├── values
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── attrs.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── styles.xml
│ │ │ │ │ └── colors.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ │ └── dimens.xml
│ │ │ │ ├── menu
│ │ │ │ │ └── menu_main.xml
│ │ │ │ ├── layout
│ │ │ │ │ ├── layout_easy_touch_linear_menu.xml
│ │ │ │ │ ├── layout_easy_touch_ball_menu.xml
│ │ │ │ │ ├── item_drawable_select.xml
│ │ │ │ │ ├── layout_easy_touch_ball.xml
│ │ │ │ │ ├── fragment_function_detail_app.xml
│ │ │ │ │ ├── activity_preview_shot_screen.xml
│ │ │ │ │ ├── layout_settings_radio_item.xml
│ │ │ │ │ ├── layout_settings_item.xml
│ │ │ │ │ ├── item_app.xml
│ │ │ │ │ ├── layout_easy_touch.xml
│ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ ├── activity_app_select.xml
│ │ │ │ │ ├── activity_ball_drawable_select.xml
│ │ │ │ │ ├── activity_shape_setting.xml
│ │ │ │ │ ├── activity_function_select.xml
│ │ │ │ │ ├── activity_function_detail_select.xml
│ │ │ │ │ ├── layout_easy_touch_ball_menu_right.xml
│ │ │ │ │ ├── layout_menu_top.xml
│ │ │ │ │ ├── fragment_app.xml
│ │ │ │ │ └── activity_about.xml
│ │ │ │ └── values-v21
│ │ │ │ │ └── styles.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── skkk
│ │ │ │ │ └── easytouch
│ │ │ │ │ ├── Receiver
│ │ │ │ │ └── AdminManageReceiver.java
│ │ │ │ │ ├── View
│ │ │ │ │ ├── BaseViewHolder.java
│ │ │ │ │ ├── BallDrawableSelect
│ │ │ │ │ │ ├── BallDrawableSelectViewHolder.java
│ │ │ │ │ │ └── BallDrawableSelectAdapter.java
│ │ │ │ │ ├── AppSelect
│ │ │ │ │ │ ├── AppViewHolder.java
│ │ │ │ │ │ ├── AppSelectActivity.java
│ │ │ │ │ │ └── AppAdapter.java
│ │ │ │ │ ├── SoftInputListenerView.java
│ │ │ │ │ ├── FunctionSelect
│ │ │ │ │ │ ├── FuncConfigs.java
│ │ │ │ │ │ ├── FunctionDetailSelectActivity.java
│ │ │ │ │ │ ├── FunctionDetailShortCutFragment.java
│ │ │ │ │ │ └── FunctionDetailAppFragment.java
│ │ │ │ │ ├── ScaleScrollView.java
│ │ │ │ │ ├── CircleImageView.java
│ │ │ │ │ ├── ScaleRecyclerView.java
│ │ │ │ │ ├── AboutActivity.java
│ │ │ │ │ ├── BaseAdapter.java
│ │ │ │ │ ├── SettingItemView.java
│ │ │ │ │ ├── SettingSwitchItemView.java
│ │ │ │ │ └── ShapeSetting
│ │ │ │ │ │ └── ShapeSettingActivity.java
│ │ │ │ │ ├── Utils
│ │ │ │ │ ├── DpUtils.java
│ │ │ │ │ ├── PermissionsUtils.java
│ │ │ │ │ ├── DialogUtils.java
│ │ │ │ │ ├── ServiceUtils.java
│ │ │ │ │ ├── EasyTouchUtils.java
│ │ │ │ │ ├── SoftInputUtils.java
│ │ │ │ │ └── SpUtils.java
│ │ │ │ │ ├── Services
│ │ │ │ │ └── FloatService.java
│ │ │ │ │ ├── MyApplication.java
│ │ │ │ │ ├── PreviewShotScreenActivity.java
│ │ │ │ │ └── Bean
│ │ │ │ │ ├── AppInfoBean.java
│ │ │ │ │ └── ShortCutInfoBean.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── skkk
│ │ │ │ └── easytouch
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── skkk
│ │ │ └── easytouch
│ │ │ └── ExampleInstrumentedTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── hs_err_pid7992.log
├── .idea
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── markdown-navigator
│ │ └── profiles_settings.xml
│ ├── file.template.settings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ └── compiler.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
└── gradlew.bat
├── images
├── 微信图片_20180113190844.png
├── 微信图片_20180113190848.png
├── 微信图片_20180113190852.png
├── 微信图片_20180113190856.png
└── 微信图片_20180113191006.png
├── sh.exe.stackdump
└── README.md
/EasyTouch/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/EasyTouch/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/EasyTouch/hs_err_pid7992.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/hs_err_pid7992.log
--------------------------------------------------------------------------------
/images/微信图片_20180113190844.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/images/微信图片_20180113190844.png
--------------------------------------------------------------------------------
/images/微信图片_20180113190848.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/images/微信图片_20180113190848.png
--------------------------------------------------------------------------------
/images/微信图片_20180113190852.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/images/微信图片_20180113190852.png
--------------------------------------------------------------------------------
/images/微信图片_20180113190856.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/images/微信图片_20180113190856.png
--------------------------------------------------------------------------------
/images/微信图片_20180113191006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/images/微信图片_20180113191006.png
--------------------------------------------------------------------------------
/EasyTouch/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/EasyTouch/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_1.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_10.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_11.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_12.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_13.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_14.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_15.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_16.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_17.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_18.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_19.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_2.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_20.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_21.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_22.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_23.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_3.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_4.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_5.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_6.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_7.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_8.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/ball_9.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/main_title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/main_title.png
--------------------------------------------------------------------------------
/EasyTouch/.idea/markdown-navigator/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/main_title_ball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/main_title_ball.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/main_title_linear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/main_title_linear.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/mian_title_custom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/drawable/mian_title_custom.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhgd3250905/EasyTouch/HEAD/EasyTouch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/EasyTouch/.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 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/xml/device_admin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_mid.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_corners_mid.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/xml/accessibilityservice.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/EasyTouch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Feb 04 18:12:44 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_corners_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_corners_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_corners_top_menu_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EasyTouch/.idea/file.template.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/shape_react_corners_top_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_add.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_add_white_48dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_arrow_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Receiver/AdminManageReceiver.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Receiver;
2 |
3 | import android.app.admin.DeviceAdminReceiver;
4 |
5 | /**
6 | * 创建于 2017/10/23
7 | * 作者 admin
8 | */
9 | /*
10 | *
11 | * 描 述:
12 | * 作 者:ksheng
13 | * 时 间:2017/10/23$ 23:30$.
14 | */
15 | public class AdminManageReceiver extends DeviceAdminReceiver {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_keyboard_arrow_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_add_gray.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_arrwo_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_warning.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_arrow_back_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/BaseViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | /**
7 | * 创建于 2017/8/14
8 | * 作者 admin
9 | */
10 | /*
11 | *
12 | * 描 述:RecyclerView ViewHolder基类
13 | * 作 者:ksheng
14 | * 时 间:2017/8/14$ 21:02$.
15 | */
16 | public class BaseViewHolder extends RecyclerView.ViewHolder{
17 | public BaseViewHolder(View itemView) {
18 | super(itemView);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/test/java/com/skkk/easytouch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_easy_touch_linear_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_easy_touch_ball_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/item_drawable_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_recent.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_notifications.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.2'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 白开水悬浮助手
3 | Settings
4 | 打开开关,才可以使用悬浮球功能。
5 |
6 |
7 | Hello blank fragment
8 | 菜单%d
9 | 点击设置
10 | 当前菜单元素%d个
11 | 版本更新内容
12 |
13 |
--------------------------------------------------------------------------------
/EasyTouch/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ball_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_rect_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_easy_touch_ball.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_line_left_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_rect_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/DpUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * 创建于 2018/1/6
7 | * 作者 admin
8 | */
9 | /*
10 | *
11 | * 描 述:
12 | * 作 者:ksheng
13 | * 时 间:2018/1/6$ 16:46$.
14 | */
15 | public class DpUtils {
16 | /**
17 | * 工具 dip 2 px
18 | *
19 | * @param dp
20 | * @return
21 | */
22 | public static int dp2px(Context context,float dp) {
23 | final float scale = context.getApplicationContext().getResources().getDisplayMetrics().density;
24 | return (int) (dp * scale + 0.1f);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_line_right_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_ball.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/fragment_function_detail_app.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_alarm.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_preview_shot_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/EasyTouch/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in E:\SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_line_right_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
15 |
19 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/BallDrawableSelect/BallDrawableSelectViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.BallDrawableSelect;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 |
6 | import com.skkk.easytouch.R;
7 | import com.skkk.easytouch.View.BaseViewHolder;
8 |
9 | /**
10 | * 创建于 2017/12/22
11 | * 作者 admin
12 | */
13 | /*
14 | *
15 | * 描 述:
16 | * 作 者:ksheng
17 | * 时 间:2017/12/22$ 23:40$.
18 | */
19 | public class BallDrawableSelectViewHolder extends BaseViewHolder {
20 | ImageView ivDrawableSelect;
21 | public BallDrawableSelectViewHolder(View itemView) {
22 | super(itemView);
23 | ivDrawableSelect= (ImageView) itemView.findViewById(R.id.iv_item_drawable_select);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_notifications_off.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/bg_linear_line_left_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
16 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/EasyTouch/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_settings_radio_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
20 |
--------------------------------------------------------------------------------
/EasyTouch/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/AppSelect/AppViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.AppSelect;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 | import android.widget.TextView;
6 |
7 | import com.skkk.easytouch.R;
8 | import com.skkk.easytouch.View.BaseViewHolder;
9 |
10 | /**
11 | * 创建于 2017/12/3
12 | * 作者 admin
13 | */
14 | /*
15 | *
16 | * 描 述:
17 | * 作 者:ksheng
18 | * 时 间:2017/12/3$ 23:32$.
19 | */
20 | public class AppViewHolder extends BaseViewHolder {
21 | ImageView ivItemIcon;
22 | TextView tvItemAppName;
23 | public AppViewHolder(View itemView) {
24 | super(itemView);
25 | ivItemIcon= (ImageView) itemView.findViewById(R.id.iv_item_icon);
26 | tvItemAppName= (TextView) itemView.findViewById(R.id.tv_item_app_name);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_alarm_off.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_settings_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
15 |
21 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/androidTest/java/com/skkk/easytouch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.skkk.easytouch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Services/FloatService.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Services;
2 |
3 | import android.accessibilityservice.AccessibilityService;
4 | import android.view.accessibility.AccessibilityEvent;
5 |
6 | /**
7 | * 创建于 2017/10/20
8 | * 作者 admin
9 | */
10 | /*
11 | *
12 | * 描 述:
13 | * 作 者:ksheng
14 | * 时 间:2017/10/20$ 18:52$.
15 | */
16 | public class FloatService extends AccessibilityService {
17 | private static AccessibilityService service;
18 |
19 | public FloatService() {
20 | service = this;
21 | }
22 |
23 | @Override
24 | public void onAccessibilityEvent(AccessibilityEvent event) {
25 |
26 | }
27 |
28 | @Override
29 | public void onInterrupt() {
30 |
31 | }
32 |
33 | public static AccessibilityService getService() {
34 | if (service == null) {
35 | return null;
36 | }
37 | return service;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_previous.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
14 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_previous.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_notification.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
14 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_scan_alipay.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_scan_weixin.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch;
2 |
3 | import android.app.Application;
4 |
5 | /**
6 | * 创建于 2018/1/12
7 | * 作者 admin
8 | */
9 | /*
10 | *
11 | * 描 述:
12 | * 作 者:ksheng
13 | * 时 间:2018/1/12$ 23:50$.
14 | */
15 | public class MyApplication extends Application {
16 | private static boolean isSettingShape = false;//外观设置是否打开
17 | private static Configs.TouchType touchType= Configs.TouchType.NONE;
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | }
23 |
24 | public static boolean isSettingShape() {
25 | return isSettingShape;
26 | }
27 |
28 | public static void setIsSettingShape(boolean isSettingShape) {
29 | MyApplication.isSettingShape = isSettingShape;
30 | }
31 |
32 | public static Configs.TouchType getTouchType() {
33 | return touchType;
34 | }
35 |
36 | public static void setTouchType(Configs.TouchType touchType) {
37 | MyApplication.touchType = touchType;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/PermissionsUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.content.Context;
4 | import android.content.pm.PackageManager;
5 | import android.support.v4.content.ContextCompat;
6 |
7 | /**
8 | * 创建于 2017/9/28
9 | * 作者 admin
10 | */
11 | /*
12 | *
13 | * 描 述:权限检测类
14 | * 作 者:ksheng
15 | * 时 间:2017/9/28$ 21:59$.
16 | */
17 | public class PermissionsUtils {
18 |
19 | // 判断权限集合
20 | public static boolean lacksPermissions(Context context,String... permissions) {
21 | boolean lack=false;
22 | for (String permission : permissions) {
23 | if (lacksPermission(context,permission)) {
24 | lack=true;
25 | }
26 | }
27 | return lack;
28 | }
29 |
30 | // 判断是否缺少权限
31 | public static boolean lacksPermission(Context context,String permission) {
32 | return ContextCompat.checkSelfPermission(context.getApplicationContext(), permission)
33 | == PackageManager.PERMISSION_DENIED;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_turn_pos.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_app_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_pay.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/DialogUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.content.Context;
4 | import android.content.DialogInterface;
5 | import android.support.annotation.DrawableRes;
6 | import android.support.v7.app.AlertDialog;
7 |
8 | /**
9 | * 创建于 2017/9/18
10 | * 作者 admin
11 | */
12 | /*
13 | *
14 | * 描 述:弹出对话框样式
15 | * 作 者:ksheng
16 | * 时 间:2017/9/18$ 21:33$.
17 | */
18 | public class DialogUtils {
19 |
20 | public static AlertDialog showDialog(Context context, @DrawableRes int iconRes, String title, String message
21 | , String positiveTitle, DialogInterface.OnClickListener positiveClickListener,
22 | String negativeTitle, DialogInterface.OnClickListener negativeClickListener){
23 | AlertDialog.Builder builder=new AlertDialog.Builder(context);
24 | builder.setIcon(iconRes);
25 | builder.setTitle(title);
26 | builder.setMessage(message);
27 | builder.setPositiveButton(positiveTitle,positiveClickListener);
28 | builder.setNegativeButton(negativeTitle,negativeClickListener);
29 | AlertDialog alertDialog = builder.create();
30 | return alertDialog;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/item_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
17 |
25 |
26 |
27 |
33 |
--------------------------------------------------------------------------------
/EasyTouch/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 | defaultConfig {
7 | applicationId "com.skkk.easytouch"
8 | minSdkVersion 21
9 | targetSdkVersion 25
10 | versionCode 5
11 | versionName "1.6"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 |
28 |
29 |
30 |
31 | compile 'com.android.support:appcompat-v7:25.2.0'
32 | compile 'com.android.support:design:25.2.0'
33 | compile 'com.jakewharton:butterknife:7.0.1'
34 | compile 'com.android.support:support-v4:25.2.0'
35 | compile 'com.google.code.gson:gson:2.8.0'
36 | compile 'com.android.support:cardview-v7:25.2.0'
37 | testCompile 'junit:junit:4.12'
38 | }
39 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/PreviewShotScreenActivity.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch;
2 |
3 | import android.net.Uri;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.view.Window;
8 | import android.view.WindowManager;
9 | import android.widget.ImageView;
10 |
11 | import butterknife.Bind;
12 | import butterknife.ButterKnife;
13 |
14 | public class PreviewShotScreenActivity extends AppCompatActivity {
15 |
16 | @Bind(R.id.iv_shot_screen_preview)
17 | ImageView ivShotScreenPreview;
18 |
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | Window window = getWindow();
24 | window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
25 | setContentView(R.layout.activity_preview_shot_screen);
26 | ButterKnife.bind(this);
27 |
28 | Uri uri = getIntent().getData();
29 | ivShotScreenPreview.setImageURI(uri);
30 |
31 | new Handler().postDelayed(new Runnable() {
32 | @Override
33 | public void run() {
34 | finish();
35 | }
36 | },2000);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_easy_touch.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
27 |
28 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/BallDrawableSelect/BallDrawableSelectAdapter.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.BallDrawableSelect;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.ViewGroup;
6 |
7 | import com.skkk.easytouch.R;
8 | import com.skkk.easytouch.Utils.PackageUtils;
9 | import com.skkk.easytouch.View.BaseAdapter;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * 创建于 2017/12/22
15 | * 作者 admin
16 | */
17 | /*
18 | *
19 | * 描 述:
20 | * 作 者:ksheng
21 | * 时 间:2017/12/22$ 23:38$.
22 | */
23 | public class BallDrawableSelectAdapter extends BaseAdapter {
24 |
25 | public BallDrawableSelectAdapter(Context context, List mDataList) {
26 | super(context, mDataList);
27 | }
28 |
29 | @Override
30 | protected BallDrawableSelectViewHolder getCostumViewHolder(ViewGroup parent, int viewType) {
31 | return new BallDrawableSelectViewHolder(LayoutInflater.from(context).inflate(R.layout.item_drawable_select,parent,false));
32 | }
33 |
34 | @Override
35 | protected void setViewHolder(BallDrawableSelectViewHolder holder, int position) {
36 | holder.ivDrawableSelect.setImageResource(PackageUtils.getResource(context,mDataList.get(position)));
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_lock.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_shot.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Bean/AppInfoBean.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Bean;
2 |
3 | /**
4 | * 创建于 2017/12/3
5 | * 作者 admin
6 | */
7 | /*
8 | *
9 | * 描 述:安装应用信息
10 | * 作 者:ksheng
11 | * 时 间:2017/12/3$ 20:34$.
12 | */
13 | public class AppInfoBean {
14 | private String pkgName;
15 | private String activityName;
16 | private String name;
17 | private int flag;
18 |
19 | public AppInfoBean( String pkgName,String activityName,String name, int flag) {
20 | this.pkgName = pkgName;
21 | this.activityName = activityName;
22 | this.name=name;
23 | this.flag = flag;
24 | }
25 |
26 | public String getActivityName() {
27 | return activityName;
28 | }
29 |
30 | public void setActivityName(String activityName) {
31 | this.activityName = activityName;
32 | }
33 |
34 | public int getFlag() {
35 | return flag;
36 | }
37 |
38 | public void setFlag(int flag) {
39 | this.flag = flag;
40 | }
41 |
42 | public String getPkgName() {
43 | return pkgName;
44 | }
45 |
46 | public void setPkgName(String pkgName) {
47 | this.pkgName = pkgName;
48 | }
49 |
50 | public String getName() {
51 | return name;
52 | }
53 |
54 | public void setName(String name) {
55 | this.name = name;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/ServiceUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.app.ActivityManager;
4 | import android.content.Context;
5 | import android.util.Log;
6 |
7 | import java.util.List;
8 |
9 | import static android.content.ContentValues.TAG;
10 |
11 | /**
12 | * 创建于 2017/10/27
13 | * 作者 admin
14 | */
15 | /*
16 | *
17 | * 描 述:
18 | * 作 者:ksheng
19 | * 时 间:2017/10/27$ 22:31$.
20 | */
21 | public class ServiceUtils {
22 | /**
23 | * 判断服务是否后台运行
24 | *
25 | * @param mContext Context
26 | * @param className 判断的服务名字
27 | * @return true 在运行 false 不在运行
28 | */
29 | public static boolean isServiceRun(Context mContext, String className) {
30 | boolean isRun = false;
31 | ActivityManager activityManager = (ActivityManager) mContext
32 | .getSystemService(Context.ACTIVITY_SERVICE);
33 | List serviceList = activityManager
34 | .getRunningServices(200);
35 | int size = serviceList.size();
36 | for (int i = 0; i < size; i++) {
37 | Log.i(TAG, "isServiceRun: -->"+serviceList.get(i).service.getClassName());
38 | if (serviceList.get(i).service.getClassName().equals(className) == true) {
39 | isRun = true;
40 | break;
41 | }
42 | }
43 | return isRun;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Bean/ShortCutInfoBean.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Bean;
2 |
3 | import android.graphics.drawable.Drawable;
4 |
5 | /**
6 | * 创建于 2017/12/3
7 | * 作者 admin
8 | */
9 | /*
10 | *
11 | * 描 述:快捷方式
12 | * 作 者:ksheng
13 | * 时 间:2017/12/3$ 20:32$.
14 | */
15 | public class ShortCutInfoBean {
16 | private String pkgName;
17 | private String activityName;
18 | private int flag;
19 | private String shortCutName;
20 | private Drawable icon;
21 |
22 | public String getActivityName() {
23 | return activityName;
24 | }
25 |
26 | public void setActivityName(String activityName) {
27 | this.activityName = activityName;
28 | }
29 |
30 | public int getFlag() {
31 | return flag;
32 | }
33 |
34 | public void setFlag(int flag) {
35 | this.flag = flag;
36 | }
37 |
38 | public String getPkgName() {
39 | return pkgName;
40 | }
41 |
42 | public String getShortCutName() {
43 | return shortCutName;
44 | }
45 |
46 | public void setShortCutName(String shortCutName) {
47 | this.shortCutName = shortCutName;
48 | }
49 |
50 | public void setPkgName(String pkgName) {
51 | this.pkgName = pkgName;
52 | }
53 |
54 | public Drawable getIcon() {
55 | return icon;
56 | }
57 |
58 | public void setIcon(Drawable icon) {
59 | this.icon = icon;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_function_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/sh.exe.stackdump:
--------------------------------------------------------------------------------
1 | MSYS-1.0.12 Build:2012-07-05 14:56
2 | Exception: STATUS_ACCESS_VIOLATION at eip=6804050C
3 | eax=00000000 ebx=0028FB8C ecx=7EFDD000 edx=00000000 esi=00019084 edi=680A1174
4 | ebp=0028FB4C esp=0028FB24 program=C:\Users\admin\AppData\Local\Atlassian\SourceTree\git_local\bin\sh.exe
5 | cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
6 | Stack trace:
7 | Frame Function Args
8 | 0028FB4C 6804050C (0028FB8C, 00000000, 0028FB7C, 68007DF0)
9 | 0028FBAC 6805323B (00019084, FFFFFFFF, 0028FBDC, 68004EE3)
10 | 0028FBDC 68004F78 (00000080, 680849C0, 0028FC0C, 68006ED3)
11 | 0028FBFC 6800506F (00000080, 00000000, 0028FC2C, 68084616)
12 | 0028FC2C 68084642 (00000080, 680A1368, 00000206, 00403BA5)
13 | 0028FC4C 00401F4A (00000080, 00000000, 0028FC7C, 00401F2F)
14 | 0028FC7C 00401F38 (00000080, 00000000, 0028FCCC, 00401A61)
15 | 0028FCCC 00401A6F (00000003, 0A012498, 0A010278, 00000000)
16 | 0028FEE8 68004B08 (00000000, 00000000, 0028FF28, 0048BAD0)
17 | 0028FF08 68004C5F (00401248, 00000000, 00000000, 00000001)
18 | 0028FF28 68004C98 (00000000, 00000000, 00000000, FFFFFFFF)
19 | 0028FF58 0048B9D8 (00401248, 00000000, 00000000, 0008EF30)
20 | 0028FF88 0040103D (7EFDE000, 0028FFD4, 77E898F2, 7EFDE000)
21 | 0028FF94 75CE336A (7EFDE000, 749404A1, 00000000, 00000000)
22 | 0028FFD4 77E898F2 (00401000, 7EFDE000, 00000000, 00000000)
23 | 0028FFEC 77E898C5 (00401000, 7EFDE000, 00000000, 78746341)
24 | End of stack trace (more stack frames may be present)
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/SoftInputListenerView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.Context;
4 | import android.util.Log;
5 | import android.view.View;
6 |
7 | /**
8 | * 创建于 2018/1/27
9 | * 作者 admin
10 | */
11 | /*
12 | *
13 | * 描 述:
14 | * 作 者:ksheng
15 | * 时 间:2018/1/27$ 14:19$.
16 | */
17 | public class SoftInputListenerView extends View {
18 | private static final String TAG = "SoftInputListenerView";
19 | private OnSoftInputStateChangeListener onSoftInputStateChangeListener;
20 |
21 | public interface OnSoftInputStateChangeListener{
22 | void onSoftInputSttateChange(int w, int h, int oldw, int oldh);
23 | }
24 |
25 | public SoftInputListenerView(Context context) {
26 | super(context);
27 |
28 | }
29 |
30 | @Override
31 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
32 | super.onSizeChanged(w, h, oldw, oldh);
33 | Log.d(TAG, "onSizeChanged() called with: w = [" + w + "], h = [" + h + "], oldw = [" + oldw + "], oldh = [" + oldh + "]");
34 | if (onSoftInputStateChangeListener!=null){
35 | onSoftInputStateChangeListener.onSoftInputSttateChange(w,h,oldw,oldh);
36 | }
37 | }
38 |
39 | public void setOnSoftInputStateChangeListener(OnSoftInputStateChangeListener onSoftInputStateChangeListener) {
40 | this.onSoftInputStateChangeListener = onSoftInputStateChangeListener;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 白开水悬浮助手是一款安卓高效率操作工具
2 |
3 | 用来解决当下随着手机屏幕有越来越大,单手操作也越来越困恼的问题;
4 |
5 | **便捷的单手操作**: 左右切换,单手无忧;
6 |
7 | **个性化的外观**: 自定义外观,选择自己喜欢的样子;
8 |
9 | **个性化的功能**: 自定义功能,选择自己熟悉的操作方式;
10 |
11 | > 其实就是买了MIX2然后发现单手操作很困难,看了一下市面上的悬浮工具都不太满意,所以自己动手做一个自己需要的;
12 |
13 | **强迫症患者的需求:**
14 |
15 | - 单击返回才是最完美的;
16 |
17 | - 三大金刚键的功能必须是一步操作就可以完成的;
18 |
19 | - 必须是可以自定义背景的;
20 |
21 |
22 | 
23 | 
24 | 
25 | 
26 | 
27 |
28 | ---
29 |
30 | ### 有任何使用问题或建议,欢迎加入QQ交流群:
31 | [白开水悬浮助手]694193470
32 |
33 |
34 | ## 更新日志
35 |
36 | ### 1.2
37 | 1.修复自定义悬浮球背景时出现设置不成功或闪退的bug;
38 | 2.修复了在横屏的时候出现悬浮条/悬浮球位置异常的bug;
39 | 3.修复了部分机型在首次开启悬浮条/悬浮球出现闪退的bug;
40 | 4.修复了功能设置界面,在切换菜单数量后子菜单功能显示异常bug;
41 | 5.修复了悬浮条外观自定义界面出现悬浮条点击功能异常bug;
42 |
43 | ### 1.5
44 | 1.优化并使用了全新的菜单详情交互方式;
45 | 2.修复了设置快捷APP菜单时出现的异常退出问题;
46 | 3.加入了截屏功能嘻嘻;
47 | 4.修复了悬浮球显示异常;
48 | 5.加入了全新的悬浮条隐藏主题样式,让悬浮条看起来更加不起眼;
49 | 6.悬浮球在你不使用的时候会自己躲起来了;
50 | 7.当你使用输入法的时候,悬浮球会自动弹起来,而悬浮条,会懂事的躲起来;
51 |
52 | ### 1.6
53 | 1.修复了悬浮条隐藏式主题左右切换时出现主题异常切换bug;
54 | 2.修复悬浮条震动设置保存无效bug;
55 | 3.更新了图标
56 |
57 | [点击进入下载页面](https://www.coolapk.com/apk/com.skkk.easytouch)
58 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_pay_alipay.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_pay.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
14 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_voice_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
29 |
30 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
14 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
17 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/AppSelect/AppSelectActivity.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.AppSelect;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import android.view.View;
7 | import android.widget.FrameLayout;
8 |
9 | import com.skkk.easytouch.Configs;
10 | import com.skkk.easytouch.R;
11 |
12 | import butterknife.Bind;
13 | import butterknife.ButterKnife;
14 |
15 | public class AppSelectActivity extends AppCompatActivity {
16 |
17 | @Bind(R.id.fl_app_select)
18 | FrameLayout flAppSelect;
19 | @Bind(R.id.tb_app_select)
20 | Toolbar tbAppSelect;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_app_select);
26 | ButterKnife.bind(this);
27 |
28 | tbAppSelect.setTitle("快捷应用选择");
29 | tbAppSelect.setNavigationOnClickListener(new View.OnClickListener() {
30 | @Override
31 | public void onClick(View v) {
32 | onBackPressed();
33 | }
34 | });
35 | tbAppSelect.setNavigationIcon(R.drawable.ic_arrow_back_white);
36 |
37 | int appIndex = getIntent().getIntExtra(Configs.KEY_BALL_MENU_SELECT_APP_INDEX, 0);
38 | int appType = getIntent().getIntExtra(Configs.KEY_APP_TYPE, 0);
39 | int touchType = getIntent().getIntExtra(Configs.KEY_TOUCH_TYPE, 0);
40 |
41 | AppFragment appFragment = AppFragment.newInstance(appIndex, appType, touchType);
42 | getSupportFragmentManager().beginTransaction()
43 | .replace(R.id.fl_app_select, appFragment)
44 | .commit();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_notification.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
15 |
17 |
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_app_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
33 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_add_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/EasyTouchUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.accessibilityservice.AccessibilityService;
4 | import android.content.Context;
5 | import android.os.Build;
6 | import android.os.Vibrator;
7 | import android.widget.Toast;
8 |
9 | import static android.content.Context.VIBRATOR_SERVICE;
10 |
11 | /**
12 | * 创建于 2017/12/6
13 | * 作者 admin
14 | */
15 | /*
16 | *
17 | * 描 述:悬浮球各种操作的功能集合类
18 | * 作 者:ksheng
19 | * 时 间:2017/12/6$ 23:31$.
20 | */
21 | public class EasyTouchUtils {
22 | private volatile static EasyTouchUtils instance;
23 | private static Context context;
24 | private Vibrator vibrator;
25 |
26 |
27 | public EasyTouchUtils(Context context) {
28 | this.context = context;
29 | vibrator = (Vibrator) context.getSystemService(VIBRATOR_SERVICE);
30 |
31 | }
32 |
33 | public static EasyTouchUtils getInstance(Context context) {
34 | if (instance == null) {
35 | synchronized (PackageUtils.class) {
36 | if (instance == null) {
37 | return new EasyTouchUtils(context);
38 | }
39 | }
40 | }
41 | return instance;
42 | }
43 |
44 | /**
45 | * 展示震动
46 | * @param vibrateLevel 震动级别
47 | */
48 | public void showVibrate(int vibrateLevel){
49 | vibrator.vibrate(vibrateLevel);
50 | }
51 |
52 |
53 |
54 | /**
55 | * 模拟全局按键
56 | *
57 | * @param service
58 | */
59 | public static void monitorSystemAction(AccessibilityService service, int action) {
60 | if (Build.VERSION.SDK_INT < 16) {
61 | Toast.makeText(service, "Android 4.1及以上系统才支持此功能,请升级后重试", Toast.LENGTH_SHORT).show();
62 | } else {
63 | service.performGlobalAction(action);
64 | }
65 | }
66 |
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_trun_pos.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
14 |
20 |
26 |
27 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_ball_drawable_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
33 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/AppSelect/AppAdapter.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.AppSelect;
2 |
3 | import android.content.Context;
4 | import android.content.pm.PackageManager;
5 | import android.view.LayoutInflater;
6 | import android.view.ViewGroup;
7 |
8 | import com.skkk.easytouch.Bean.AppInfoBean;
9 | import com.skkk.easytouch.R;
10 | import com.skkk.easytouch.Utils.PackageUtils;
11 | import com.skkk.easytouch.View.BaseAdapter;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * 创建于 2017/12/3
17 | * 作者 admin
18 | */
19 | /*
20 | *
21 | * 描 述:
22 | * 作 者:ksheng
23 | * 时 间:2017/12/3$ 23:32$.
24 | */
25 | public class AppAdapter extends BaseAdapter {
26 |
27 | public AppAdapter(Context context, List mDataList) {
28 | super(context, mDataList);
29 | }
30 |
31 | @Override
32 | protected AppViewHolder getCostumViewHolder(ViewGroup parent, int viewType) {
33 | return new AppViewHolder(LayoutInflater.from(context).inflate(R.layout.item_app, parent, false));
34 | }
35 |
36 | @Override
37 | protected void setViewHolder(AppViewHolder holder, int position) {
38 | PackageManager packageManager = context.getPackageManager();
39 | AppInfoBean bean = mDataList.get(position);
40 | holder.ivItemIcon.setImageDrawable(PackageUtils.getInstance(context).getShortCutIcon(bean));
41 | // // 拿到包名
42 | // String pkg = info.activityInfo.packageName;
43 | //// 拿到运行的Cls名
44 | // String cls = info.activityInfo.name;
45 | //// 拿到应用程序的信息
46 | // ApplicationInfo appInfo = info.activityInfo.applicationInfo;
47 | //// 拿到应用程序的图标
48 | // Drawable icon = getAppIcon(info);
49 | //// 拿到应用名
50 | // String appName=info.loadLabel(packageManager).toString();
51 | holder.tvItemAppName.setText(bean.getName());
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_media_off.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_screen_lock.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
18 |
23 |
24 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/FunctionSelect/FuncConfigs.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.FunctionSelect;
2 |
3 | /**
4 | * 创建于 2018/1/5
5 | * 作者 admin
6 | */
7 | /*
8 | *
9 | * 描 述:
10 | * 作 者:ksheng
11 | * 时 间:2018/1/5$ 21:00$.
12 | */
13 | public class FuncConfigs {
14 |
15 | public static final String KEY_FUNC_OP="key_func_op";
16 |
17 | public static final String VALUE_FUNC_OP_CLICK="value_func_op_click";
18 | public static final String VALUE_FUNC_OP_LONG_CLICK="value_func_op_long_click";
19 | public static final String VALUE_FUNC_OP_FLING_UP="value_func_op_fling_up";
20 | public static final String VALUE_FUNC_OP_FLING_LEFT="value_func_op_fling_left";
21 | public static final String VALUE_FUNC_OP_FLING_BOTTOM="value_func_op_fling_bottom";
22 | public static final String VALUE_FUNC_OP_FLING_RIGHT="value_func_op_fling_right";
23 |
24 | public static final String VALUE_FUNC_OP_TOP_CLICK="value_func_op_top_click";
25 | public static final String VALUE_FUNC_OP_TOP_FLING_UP="value_func_op_top_fling_up";
26 | public static final String VALUE_FUNC_OP_TOP_FLING_BOTTOM="value_func_op_top_fling_bottom";
27 | public static final String VALUE_FUNC_OP_MID_CLICK="value_func_op_mid_click";
28 | public static final String VALUE_FUNC_OP_BOTTOM_CLICK="value_func_op_bottom_click";
29 | public static final String VALUE_FUNC_OP_BOTTOM_FLING_UP="value_func_op_bottom_fling_up";
30 | public static final String VALUE_FUNC_OP_BOTTOM_FLING_BOTTOM="value_func_op_bottom_fling_bottom";
31 |
32 | public static final String VALUE_FUNC_OP_MENU_BALL="value_func_op_menu_ball_";
33 |
34 | public static final int REQUEST_SELECT_FUNC_DETAIL = 101;
35 |
36 | public enum Func {
37 | BACK,
38 | HOME,
39 | RECENT,
40 | NOTIFICATION,
41 | TRUN_POS,
42 | VOICE_MENU,
43 | PAY_MENU,
44 | APP_MENU,
45 | APPS,
46 | MENU,
47 | PREVIOUS_APP,
48 | LOCK_SCREEN,
49 | SHOT_SCREEN;
50 | public int getValue() {
51 | return this.ordinal();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
24 |
25 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
43 |
44 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_shape_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
38 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_function_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
38 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_ball_menu_voice.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
14 |
20 |
26 |
27 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_selection.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/ic_media.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_shot.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
15 |
17 |
18 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4D70B0
4 | #4D70B0
5 | #C7425C
6 |
7 | #55f03c78
8 | #5550a0b4
9 | #5578503c
10 |
11 | #FFFFFF
12 | #00000000
13 |
14 |
15 | #383838
16 | #383838
17 | #dc7878
18 | #454545
19 |
20 | #555555
21 | #00000000
22 | #55000000
23 | #88000000
24 | #88ffffff
25 |
26 |
27 | #3ffffF
28 | #000000
29 | #cc000000
30 | #bbff2244
31 | #fff
32 | #55ffffff
33 | #999999
34 | #aaaaaa
35 | #552B6582
36 | #50c8b4
37 | #b45064
38 | #6464f0
39 | #FFFFFF
40 | #56abe4
41 | #2aa515
42 | #d81e06
43 | #e9e7e8
44 |
45 | #fb7299
46 | #b85671
47 | #99f0486c
48 |
49 | #A35150
50 | #455882
51 | #544A4A
52 | #50783c
53 | #b4503c
54 |
55 |
56 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_function_detail_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_drawable_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
13 |
15 |
16 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_easy_touch_ball_menu_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
19 |
20 |
27 |
28 |
35 |
36 |
43 |
44 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/EasyTouch/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_ball_menu_pay.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/drawable/vector_ball_menu_apps.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
9 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/layout_menu_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
23 |
24 |
25 |
26 |
30 |
31 |
36 |
37 |
42 |
43 |
44 |
45 |
49 |
50 |
55 |
56 |
61 |
62 |
63 |
64 |
68 |
69 |
74 |
75 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/ScaleScrollView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.animation.ObjectAnimator;
4 | import android.content.Context;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.view.ViewCompat;
7 | import android.support.v4.widget.NestedScrollView;
8 | import android.util.AttributeSet;
9 | import android.view.MotionEvent;
10 | import android.view.animation.DecelerateInterpolator;
11 |
12 | /**
13 | * 类似小米列表的拖拽效果
14 | * Created by shengk on 2017/12/18.
15 | */
16 |
17 | public class ScaleScrollView extends NestedScrollView {
18 | private static final String TAG = "ScaleRecyclerView";
19 | private float lastX;
20 | private float lastY;
21 |
22 | private boolean isScale=false;
23 | private float mScale=1.0f;
24 | private float mScaleRatio=0.3f;
25 |
26 | public ScaleScrollView(Context context) {
27 | super(context);
28 | }
29 |
30 | public ScaleScrollView(Context context, @Nullable AttributeSet attrs) {
31 | super(context, attrs);
32 | }
33 |
34 | public ScaleScrollView(Context context, @Nullable AttributeSet attrs, int defStyle) {
35 | super(context, attrs, defStyle);
36 | }
37 |
38 | @Override
39 | public boolean dispatchTouchEvent(MotionEvent ev) {
40 | float x= ev.getX();
41 | float y=ev.getY();
42 | switch (ev.getAction()){
43 | case MotionEvent.ACTION_DOWN:
44 | lastX=x;
45 | lastY=y;
46 | break;
47 | case MotionEvent.ACTION_MOVE:
48 | if (y-lastY>0){
49 | if (getScrollY() == 0){
50 | float distance=y-lastY;
51 | mScale=1+distance*mScaleRatio/getHeight();
52 | setPivotY(0f);
53 | setPivotX(getWidth()/2);
54 | ViewCompat.setScaleY(this,mScale);
55 | isScale=true;
56 | }
57 | }
58 | // else {
59 | // int count=getChildCount();
60 | // if (getScrollY() + getHeight() - getPaddingTop()-getPaddingBottom() == getChildAt(0).getHeight()){
61 | // float distance=y-lastY;
62 | // mScale=1-mScaleRatio*distance/getHeight();
63 | // setPivotX(getWidth()/2);
64 | // setPivotY(getHeight());
65 | // ViewCompat.setScaleY(this,mScale);
66 | // isScale=true;
67 | // }
68 | // }
69 | break;
70 | case MotionEvent.ACTION_UP:
71 | if (isScale){
72 | ObjectAnimator animator=ObjectAnimator.ofFloat(this,"scaleY",mScale,1.0f);
73 | animator.setInterpolator(new DecelerateInterpolator());
74 | animator.setDuration(200);
75 | animator.start();
76 | isScale=false;
77 | }
78 | break;
79 | }
80 | return super.dispatchTouchEvent(ev);
81 | }
82 | }
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/CircleImageView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapShader;
6 | import android.graphics.Canvas;
7 | import android.graphics.Color;
8 | import android.graphics.Matrix;
9 | import android.graphics.Paint;
10 | import android.graphics.Rect;
11 | import android.graphics.Shader;
12 | import android.graphics.drawable.BitmapDrawable;
13 | import android.graphics.drawable.ColorDrawable;
14 | import android.graphics.drawable.Drawable;
15 | import android.util.AttributeSet;
16 | import android.widget.ImageView;
17 |
18 | /**
19 | * 创建于 2018/1/6
20 | * 作者 admin
21 | */
22 | /*
23 | *
24 | * 描 述:
25 | * 作 者:ksheng
26 | * 时 间:2018/1/6$ 21:44$.
27 | */
28 | public class CircleImageView extends ImageView {
29 | private Paint mPaintBitmap = new Paint(Paint.ANTI_ALIAS_FLAG);
30 | private Bitmap mRawBitmap;
31 | private BitmapShader mShader;
32 | private Matrix mMatrix = new Matrix();
33 |
34 | public CircleImageView(Context context) {
35 | super(context);
36 | }
37 |
38 | public CircleImageView(Context context, AttributeSet attrs) {
39 | super(context, attrs);
40 | }
41 |
42 | @Override
43 | protected void onDraw(Canvas canvas) {
44 | Bitmap rawBitmap = getBitmap(getDrawable());
45 | if (rawBitmap != null) {
46 | int viewWidth = getWidth();
47 | int viewHeight = getHeight();
48 | int viewMinSize = Math.min(viewWidth, viewHeight);
49 | float dstWidth = viewMinSize;
50 | float dstHeight = viewMinSize;
51 | if (mShader == null || !rawBitmap.equals(mRawBitmap)) {
52 | mRawBitmap = rawBitmap;
53 | mShader = new BitmapShader(mRawBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
54 | }
55 | if (mShader != null) {
56 | mMatrix.setScale(dstWidth / rawBitmap.getWidth(), dstHeight / rawBitmap.getHeight());
57 | mShader.setLocalMatrix(mMatrix);
58 | }
59 | mPaintBitmap.setShader(mShader);
60 | float radius = viewMinSize / 2.0f;
61 | canvas.drawCircle(radius, radius, radius, mPaintBitmap);
62 | } else {
63 | super.onDraw(canvas);
64 | }
65 | }
66 |
67 | private Bitmap getBitmap(Drawable drawable) {
68 | if (drawable instanceof BitmapDrawable) {
69 | return ((BitmapDrawable) drawable).getBitmap();
70 | } else if (drawable instanceof ColorDrawable) {
71 | Rect rect = drawable.getBounds();
72 | int width = rect.right - rect.left;
73 | int height = rect.bottom - rect.top;
74 | int color = ((ColorDrawable) drawable).getColor();
75 | Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
76 | Canvas canvas = new Canvas(bitmap);
77 | canvas.drawARGB(Color.alpha(color), Color.red(color), Color.green(color), Color.blue(color));
78 | return bitmap;
79 | } else {
80 | return null;
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/SoftInputUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.graphics.Rect;
4 | import android.util.Log;
5 | import android.view.View;
6 | import android.view.ViewTreeObserver;
7 |
8 | /**
9 | * 创建于 2017/11/14
10 | * 作者 admin
11 | */
12 | /*
13 | *
14 | * 描 述:
15 | * 作 者:ksheng
16 | * 时 间:2017/11/14$ 22:23$.
17 | */
18 | public class SoftInputUtils {
19 | private static boolean isFirst = true;
20 |
21 | public interface OnGetSoftHeightListener {
22 | void onShowed(int height);
23 | }
24 |
25 | public interface OnSoftKeyWordShowListener {
26 | void hasShow(boolean isShow);
27 | }
28 |
29 | /**
30 | * 获取软键盘的高度 * *
31 | *
32 | * @param rootView *
33 | * @param listener
34 | */
35 | public static void getSoftKeyboardHeight(final View rootView, final OnGetSoftHeightListener listener) {
36 | final ViewTreeObserver.OnGlobalLayoutListener layoutListener
37 | = new ViewTreeObserver.OnGlobalLayoutListener() {
38 | @Override
39 | public void onGlobalLayout() {
40 | if (isFirst) {
41 | final Rect rect = new Rect();
42 | rootView.getWindowVisibleDisplayFrame(rect);
43 | final int screenHeight = rootView.getRootView().getHeight();
44 | final int heightDifference = screenHeight - rect.bottom;
45 | //设置一个阀值来判断软键盘是否弹出
46 | boolean visible = heightDifference > screenHeight / 3;
47 | if (visible) {
48 | isFirst = false;
49 | if (listener != null) {
50 | listener.onShowed(heightDifference);
51 | }
52 | rootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
53 | }
54 | }
55 | }
56 | };
57 | rootView.getViewTreeObserver().addOnGlobalLayoutListener(layoutListener);
58 | }
59 |
60 |
61 | /**
62 | * 判断软键盘是否弹出
63 | * * @param rootView
64 | *
65 | * @param listener 备注:在不用的时候记得移除OnGlobalLayoutListener
66 | */
67 | public static ViewTreeObserver.OnGlobalLayoutListener doMonitorSoftKeyWord(final View rootView, final OnSoftKeyWordShowListener listener) {
68 | final ViewTreeObserver.OnGlobalLayoutListener layoutListener = new ViewTreeObserver.OnGlobalLayoutListener() {
69 | @Override
70 | public void onGlobalLayout() {
71 | final Rect rect = new Rect();
72 | rootView.getWindowVisibleDisplayFrame(rect);
73 | final int screenHeight = rootView.getRootView().getHeight();
74 | Log.e("TAG", rect.bottom + "#" + screenHeight);
75 | final int heightDifference = screenHeight - rect.bottom;
76 | boolean visible = heightDifference > screenHeight / 3;
77 | if (listener != null)
78 | listener.hasShow(visible);
79 | }
80 | };
81 | rootView.getViewTreeObserver().addOnGlobalLayoutListener(layoutListener);
82 | return layoutListener;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/ScaleRecyclerView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.animation.ObjectAnimator;
4 | import android.content.Context;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.view.ViewCompat;
7 | import android.support.v7.widget.LinearLayoutManager;
8 | import android.support.v7.widget.RecyclerView;
9 | import android.util.AttributeSet;
10 | import android.view.MotionEvent;
11 | import android.view.View;
12 | import android.view.animation.DecelerateInterpolator;
13 |
14 | /**
15 | * 类似小米列表的拖拽效果
16 | * Created by shengk on 2017/12/18.
17 | */
18 |
19 | public class ScaleRecyclerView extends RecyclerView {
20 | private static final String TAG = "ScaleRecyclerView";
21 | private float lastX;
22 | private float lastY;
23 |
24 | private boolean isScale=false;
25 | private float mScale=1.0f;
26 | private float mScaleRatio=0.3f;
27 |
28 | public ScaleRecyclerView(Context context) {
29 | super(context);
30 | }
31 |
32 | public ScaleRecyclerView(Context context, @Nullable AttributeSet attrs) {
33 | super(context, attrs);
34 | }
35 |
36 | public ScaleRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
37 | super(context, attrs, defStyle);
38 | }
39 |
40 | @Override
41 | public boolean dispatchTouchEvent(MotionEvent ev) {
42 | float x= ev.getX();
43 | float y=ev.getY();
44 | switch (ev.getAction()){
45 | case MotionEvent.ACTION_DOWN:
46 | lastX=x;
47 | lastY=y;
48 | break;
49 | case MotionEvent.ACTION_MOVE:
50 | if (y-lastY>0){
51 | View view=getChildAt(0);
52 | int pos=((LinearLayoutManager)getLayoutManager()).findFirstVisibleItemPosition();
53 | if (pos==0&&view.getTop()>=0){
54 | float distance=y-lastY;
55 | mScale=1+distance*mScaleRatio/getHeight();
56 | setPivotY(0f);
57 | setPivotX(getWidth()/2);
58 | ViewCompat.setScaleY(this,mScale);
59 | isScale=true;
60 | }
61 | }else {
62 | int count=getChildCount();
63 | View lastView=getChildAt(count-1);
64 | int pos=((LinearLayoutManager)getLayoutManager()).findLastVisibleItemPosition();
65 | if (pos+1==getAdapter().getItemCount()&&lastView.getBottom()<=getBottom()){
66 | float distance=y-lastY;
67 | mScale=1-mScaleRatio*distance/getHeight();
68 | setPivotX(getWidth()/2);
69 | setPivotY(getHeight());
70 | ViewCompat.setScaleY(this,mScale);
71 | isScale=true;
72 | }
73 | }
74 | break;
75 | case MotionEvent.ACTION_UP:
76 | if (isScale){
77 | ObjectAnimator animator=ObjectAnimator.ofFloat(this,"scaleY",mScale,1.0f);
78 | animator.setInterpolator(new DecelerateInterpolator());
79 | animator.setDuration(200);
80 | animator.start();
81 | isScale=false;
82 | }
83 | break;
84 | }
85 | return super.dispatchTouchEvent(ev);
86 | }
87 | }
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.ClipData;
4 | import android.content.ClipboardManager;
5 | import android.content.Context;
6 | import android.content.pm.PackageInfo;
7 | import android.content.pm.PackageManager;
8 | import android.os.Bundle;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.support.v7.widget.Toolbar;
11 | import android.util.Log;
12 | import android.view.View;
13 | import android.widget.TextView;
14 | import android.widget.Toast;
15 |
16 | import com.skkk.easytouch.R;
17 |
18 | import butterknife.Bind;
19 | import butterknife.ButterKnife;
20 | import butterknife.OnClick;
21 |
22 | public class AboutActivity extends AppCompatActivity {
23 |
24 | @Bind(R.id.tb_about)
25 | Toolbar tbAbout;
26 | @Bind(R.id.textView2)
27 | TextView textView2;
28 | @Bind(R.id.settings_item_version)
29 | SettingItemView settingsItemVersion;
30 | @Bind(R.id.settings_item_email)
31 | SettingItemView settingsItemEmail;
32 | @Bind(R.id.settings_item_qq)
33 | SettingItemView settingsItemQq;
34 | @Bind(R.id.settings_item_github)
35 | SettingItemView settingsItemGithub;
36 |
37 | @Override
38 | protected void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.activity_about);
41 | ButterKnife.bind(this);
42 | tbAbout.setTitle("其他");
43 | tbAbout.setNavigationOnClickListener(new View.OnClickListener() {
44 | @Override
45 | public void onClick(View v) {
46 | onBackPressed();
47 | }
48 | });
49 | tbAbout.setNavigationIcon(R.drawable.ic_arrow_back_white);
50 | settingsItemVersion.setValue(getAppVersionName(this));
51 | }
52 |
53 | @OnClick({R.id.settings_item_email, R.id.settings_item_qq, R.id.settings_item_github})
54 | public void onViewClicked(View view) {
55 | ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
56 | // 将文本内容放到系统剪贴板里。
57 | ClipData mClipData =null;
58 | String type="";
59 | switch (view.getId()) {
60 | case R.id.settings_item_email:
61 | mClipData =ClipData.newPlainText("Label", "294851575@qq.com");
62 | type="邮箱地址";
63 | break;
64 | case R.id.settings_item_qq:
65 | mClipData =ClipData.newPlainText("Label", "694193470");
66 | type="QQ群号";
67 | break;
68 | case R.id.settings_item_github:
69 | mClipData =ClipData.newPlainText("Label", "https://github.com/mhgd3250905");
70 | type="Github地址";
71 | break;
72 | }
73 | cm.setPrimaryClip(mClipData);
74 | Toast.makeText(this, "成功复制"+type, Toast.LENGTH_LONG).show();
75 |
76 | }
77 |
78 | /**
79 | * 返回当前程序版本名
80 | */
81 | public static String getAppVersionName(Context context) {
82 | String versionName = "";
83 | try {
84 | // ---get the package info---
85 | PackageManager pm = context.getPackageManager();
86 | PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
87 | versionName = pi.versionName;
88 | // versioncode = pi.versionCode;
89 | if (versionName == null || versionName.length() <= 0) {
90 | return "";
91 | }
92 | } catch (Exception e) {
93 | Log.e("VersionInfo", "Exception", e);
94 | }
95 | return versionName;
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/BaseAdapter.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | * 创建于 2017/8/14
12 | * 作者 admin
13 | */
14 | /*
15 | *
16 | * 描 述:RecyclerView数据适配器基类
17 | * 作 者:ksheng
18 | * 时 间:2017/8/14$ 21:01$.
19 | */
20 | public abstract class BaseAdapter extends RecyclerView.Adapter{
21 | protected List mDataList;
22 | protected Context context;
23 | protected OnItemClickListener onItemClickListener;
24 |
25 | public interface OnItemClickListener{
26 | void onItemClick(View view, int pos);
27 | }
28 |
29 | public BaseAdapter(Context context, List mDataList) {
30 | this.context = context;
31 | this.mDataList = mDataList;
32 | }
33 |
34 | @Override
35 | public V onCreateViewHolder(ViewGroup parent, int viewType) {
36 | V v=getCostumViewHolder(parent,viewType);
37 | return v;
38 | }
39 |
40 | @Override
41 | public void onBindViewHolder(final V holder, int position) {
42 | holder.itemView.setOnClickListener(new View.OnClickListener() {
43 | @Override
44 | public void onClick(View v) {
45 | if (onItemClickListener!=null){
46 | onItemClickListener.onItemClick(v,holder.getAdapterPosition());
47 | }
48 | }
49 | });
50 | setViewHolder(holder,position);
51 | }
52 |
53 | @Override
54 | public int getItemCount() {
55 | return mDataList.size();
56 | }
57 |
58 | /**
59 | * 返回需要设置的ViewHolder
60 | * @param parent
61 | * @param viewType
62 | * @return
63 | */
64 | protected abstract V getCostumViewHolder(ViewGroup parent, int viewType);
65 |
66 | /**
67 | * 设置ViewHolder绑定事件
68 | * @param holder
69 | * @param position
70 | */
71 | protected abstract void setViewHolder(V holder, int position);
72 |
73 | /**
74 | * 添加单个数据
75 | * @param t
76 | */
77 | public void add(T t){
78 | mDataList.add(t);
79 | }
80 |
81 | /**
82 | * 添加指定位置的单个数据
83 | * @param index
84 | * @param t
85 | */
86 | public void add(int index,T t){
87 | mDataList.add(index,t);
88 | }
89 |
90 | /**
91 | * 批量添加数据
92 | * @param list
93 | */
94 | public void addAll(List list){
95 | mDataList.addAll(list);
96 | }
97 |
98 | /**
99 | * 在指定位置批量添加数据
100 | * @param index
101 | * @param list
102 | */
103 | public void addAll(int index,List list){
104 | mDataList.addAll(index,list);
105 | }
106 |
107 | /**
108 | * 删除单个数据
109 | * @param t
110 | */
111 | public void remove(T t){
112 | mDataList.remove(t);
113 | }
114 |
115 | /**
116 | * 删除指定位置单个数据
117 | * @param index
118 | */
119 | public void remove(int index){
120 | mDataList.remove(index);
121 | }
122 |
123 | /*
124 | * 设置数据集
125 | * */
126 | public List getmDataList() {
127 | return mDataList;
128 | }
129 |
130 | public void setmDataList(List mDataList) {
131 | this.mDataList = mDataList;
132 | }
133 |
134 | public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
135 | this.onItemClickListener = onItemClickListener;
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/SettingItemView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.support.v4.content.ContextCompat;
6 | import android.util.AttributeSet;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.LinearLayout;
11 | import android.widget.TextView;
12 |
13 | import com.skkk.easytouch.R;
14 |
15 | /**
16 | * 创建于 2017/10/18
17 | * 作者 admin
18 | */
19 | /*
20 | *
21 | * 描 述:设置栏位Item
22 | * 作 者:ksheng
23 | * 时 间:2017/10/18$ 22:36$.
24 | */
25 | public class SettingItemView extends LinearLayout {
26 | private ViewGroup container;
27 | private TextView tvTitle,tvValue;
28 |
29 | public SettingItemView(Context context) {
30 | super(context);
31 | initUI(null);
32 | }
33 |
34 | public SettingItemView(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | initUI(attrs);
37 | }
38 |
39 | public SettingItemView(Context context, AttributeSet attrs, int defStyleAttr) {
40 | super(context, attrs, defStyleAttr);
41 | initUI(attrs);
42 | }
43 |
44 | /**
45 | * 初始化界面
46 | */
47 | private void initUI(AttributeSet attrs) {
48 | LayoutInflater.from(getContext()).inflate(R.layout.layout_settings_item,this,true);
49 | container= (ViewGroup) findViewById(R.id.container_settings);
50 | tvTitle= (TextView) findViewById(R.id.tv_settings_title);
51 | tvValue= (TextView) findViewById(R.id.tv_settings_value);
52 |
53 | if (attrs!=null) {
54 | TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.SettingItemView);
55 | String title = ta.getString(R.styleable.SettingItemView_title);
56 | String value = ta.getString(R.styleable.SettingItemView_value);
57 | ta.recycle();
58 |
59 | tvTitle.setText(title);
60 | tvValue.setText(value);
61 | }
62 | }
63 |
64 | /**
65 | * 设置条目点击事件
66 | * @param onClickListener
67 | */
68 | public void setSettingItemClickListener(final OnClickListener onClickListener){
69 | if (container!=null){
70 | container.setOnClickListener(new OnClickListener() {
71 | @Override
72 | public void onClick(View v) {
73 | if (onClickListener!=null) {
74 | onClickListener.onClick(v);
75 | }
76 | }
77 | });
78 | }
79 | }
80 |
81 | /**
82 | * 设置标题
83 | * @param title
84 | */
85 | public void setTitle(String title){
86 | if (tvTitle!=null){
87 | tvTitle.setText(title);
88 | }
89 | }
90 |
91 | /**
92 | * 设置内容
93 | * @param value
94 | */
95 | public void setValue(String value){
96 | if (tvValue!=null){
97 | tvValue.setText(value);
98 | tvValue.setTextColor(ContextCompat.getColor(getContext(),R.color.colorGray));
99 |
100 | }
101 | }
102 |
103 | /**
104 | * 设置内容
105 | * @param value
106 | */
107 | public void setWarning(String value){
108 | if (tvValue!=null){
109 | tvValue.setText(value);
110 | tvValue.setTextColor(ContextCompat.getColor(getContext(),R.color.colorAccent));
111 | }
112 | }
113 |
114 | /**
115 | * 设置Item是否可用
116 | * @param enable
117 | */
118 | public void setItemEnable(boolean enable){
119 | container.setEnabled(enable);
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/Utils/SpUtils.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.Utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | import static android.content.Context.MODE_PRIVATE;
7 |
8 | /**
9 | * 创建于 2017/10/14
10 | * 作者 admin
11 | */
12 | /*
13 | *
14 | * 描 述:SharedPreferences 工具类
15 | * 作 者:ksheng
16 | * 时 间:2017/10/14$ 18:00$.
17 | */
18 | public class SpUtils {
19 | public static final String KEY_APP_IS_FIRST_RYN="key_app_is_first_ryn";//是否为第一次运行
20 | public static final String KEY_MENU_BALL_COUNT="key_menu_ball_count";//二级菜单的球有几个
21 |
22 | /**
23 | * 保存String
24 | *
25 | * @param context
26 | * @param key
27 | * @param value
28 | */
29 | public static void saveString(Context context, String key, String value) {
30 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
31 | sp.edit().putString(key, value).apply();
32 | }
33 |
34 | /**
35 | * 获取String 默认返回值为""
36 | *
37 | * @param context
38 | * @param key
39 | * @return
40 | */
41 | public static String getString(Context context, String key, String defValue) {
42 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
43 | return sp.getString(key, defValue);
44 | }
45 |
46 | /**
47 | * 保存布尔值
48 | *
49 | * @param context
50 | * @param key
51 | * @param value
52 | */
53 | public static void saveBoolean(Context context, String key, boolean value) {
54 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
55 | sp.edit().putBoolean(key, value).apply();
56 | }
57 |
58 | /**
59 | * 获取布尔值 默认返回值false
60 | *
61 | * @param context
62 | * @param key
63 | * @return
64 | */
65 | public static boolean getBoolean(Context context, String key, boolean defValue) {
66 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
67 | return sp.getBoolean(key, defValue);
68 | }
69 |
70 | /**
71 | * 保存int
72 | *
73 | * @param context
74 | * @param key
75 | * @param value
76 | */
77 | public static void saveInt(Context context, String key, int value) {
78 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
79 | sp.edit().putInt(key, value).apply();
80 | }
81 |
82 | /**
83 | * 获取int 默认0
84 | *
85 | * @param context
86 | * @param key
87 | * @return
88 | */
89 | public static int getInt(Context context, String key, int defValue) {
90 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
91 | return sp.getInt(key, defValue);
92 | }
93 |
94 | /**
95 | * 保存浮点数
96 | *
97 | * @param context
98 | * @param key
99 | * @param value
100 | */
101 | public static void saveFloat(Context context, String key, float value) {
102 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
103 | sp.edit().putFloat(key, value).apply();
104 | }
105 |
106 | /**
107 | * 获取浮点数 默认为0f
108 | *
109 | * @param context
110 | * @param key
111 | * @return
112 | */
113 | public static float getFloat(Context context, String key, float defValue) {
114 | SharedPreferences sp = context.getApplicationContext().getSharedPreferences("note", MODE_PRIVATE);
115 | return sp.getFloat(key, defValue);
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/SettingSwitchItemView.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.util.AttributeSet;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.CompoundButton;
10 | import android.widget.LinearLayout;
11 | import android.widget.Switch;
12 | import android.widget.TextView;
13 |
14 | import com.skkk.easytouch.R;
15 |
16 | /**
17 | * 创建于 2017/10/18
18 | * 作者 admin
19 | */
20 | /*
21 | *
22 | * 描 述:设置栏位Item
23 | * 作 者:ksheng
24 | * 时 间:2017/10/18$ 22:36$.
25 | */
26 | public class SettingSwitchItemView extends LinearLayout {
27 | private ViewGroup container;
28 | private TextView tvTitle;
29 | private Switch switchSettings;
30 |
31 | public SettingSwitchItemView(Context context) {
32 | super(context);
33 | initUI(null);
34 | }
35 |
36 | public SettingSwitchItemView(Context context, AttributeSet attrs) {
37 | super(context, attrs);
38 | initUI(attrs);
39 | }
40 |
41 | public SettingSwitchItemView(Context context, AttributeSet attrs, int defStyleAttr) {
42 | super(context, attrs, defStyleAttr);
43 | initUI(attrs);
44 | }
45 |
46 | /**
47 | * 初始化界面
48 | */
49 | private void initUI(AttributeSet attrs) {
50 | LayoutInflater.from(getContext()).inflate(R.layout.layout_settings_radio_item,this,true);
51 | container= (ViewGroup) findViewById(R.id.container_settings);
52 | tvTitle= (TextView) findViewById(R.id.tv_settings_title);
53 | switchSettings= (Switch) findViewById(R.id.swicth_settings);
54 |
55 | if (attrs!=null) {
56 | TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.SettingSwitchItemView);
57 | String title = ta.getString(R.styleable.SettingSwitchItemView_switchTitle);
58 | boolean checked = ta.getBoolean(R.styleable.SettingSwitchItemView_switchChecked,false);
59 | ta.recycle();
60 |
61 | tvTitle.setText(title);
62 | switchSettings.setChecked(checked);
63 | }
64 | }
65 |
66 | /**
67 | * 设置条目点击事件
68 | * @param onClickListener
69 | */
70 | public void setSettingItemClickListener(final OnClickListener onClickListener){
71 | if (container!=null){
72 | container.setOnClickListener(new OnClickListener() {
73 | @Override
74 | public void onClick(View v) {
75 | if (onClickListener!=null) {
76 | onClickListener.onClick(v);
77 | }
78 | }
79 | });
80 | }
81 | }
82 |
83 | /**
84 | * 设置标题
85 | * @param title
86 | */
87 | public void setTitle(String title){
88 | if (tvTitle!=null){
89 | tvTitle.setText(title);
90 | }
91 | }
92 |
93 | /**
94 | * 设置选项是否勾选
95 | * @param checked
96 | */
97 | public void setSwichChecked(boolean checked){
98 | if (switchSettings!=null){
99 | switchSettings.setChecked(checked);
100 | }
101 | }
102 |
103 | /**
104 | * 设置勾选监听
105 | * @param onCheckedChangeListener
106 | */
107 | public void setOnSwitchCheckedChangeListener(CompoundButton.OnCheckedChangeListener onCheckedChangeListener){
108 | if (switchSettings!=null){
109 | switchSettings.setOnCheckedChangeListener(onCheckedChangeListener);
110 | }
111 | }
112 |
113 |
114 |
115 | /**
116 | * 设置Item是否可用
117 | * @param enable
118 | */
119 | public void setItemEnable(boolean enable){
120 | container.setEnabled(enable);
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
39 |
40 |
44 |
48 |
49 |
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
65 |
66 |
69 |
72 |
75 |
76 |
77 |
82 |
85 |
86 |
87 |
88 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/FunctionSelect/FunctionDetailSelectActivity.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.FunctionSelect;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import android.view.View;
7 |
8 | import com.skkk.easytouch.R;
9 |
10 | import butterknife.Bind;
11 | import butterknife.ButterKnife;
12 |
13 | public class FunctionDetailSelectActivity extends AppCompatActivity {
14 |
15 | private static final String TAG = "ShapeSettingActivity";
16 | @Bind(R.id.tb_function_detail_select)
17 | Toolbar tbFunctionDetailSelect;
18 |
19 |
20 | // private ArrayList fragmentList;
21 | // private String[] TITLE = new String[]{"基础操作"};
22 | // private ViewPagerAdapter adapter;
23 | private String opType;
24 |
25 | @Override
26 | protected void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | setContentView(R.layout.activity_function_detail_select);
29 | ButterKnife.bind(this);
30 | initData();
31 | initUI();
32 | }
33 |
34 | /**
35 | * 初始化Data
36 | */
37 | private void initData() {
38 | opType = getIntent().getStringExtra(FuncConfigs.KEY_FUNC_OP);
39 | }
40 |
41 | /**
42 | * 初始化UI
43 | */
44 | private void initUI() {
45 | tbFunctionDetailSelect.setTitle("功能选择");
46 | tbFunctionDetailSelect.setNavigationOnClickListener(new View.OnClickListener() {
47 | @Override
48 | public void onClick(View v) {
49 | onBackPressed();
50 | }
51 | });
52 | tbFunctionDetailSelect.setNavigationIcon(R.drawable.ic_arrow_back_white);
53 |
54 | getSupportFragmentManager().beginTransaction()
55 | .replace(R.id.fl_function_detail_base, FunctionDetailBaseFragment.newInstance(opType, ""))
56 | .commit();
57 | // fragmentList = new ArrayList();
58 | // fragmentList.add(FunctionDetailBaseFragment.newInstance(opType, ""));
59 | //// fragmentList.add(FunctionDetailAppFragment.newInstance(opType, ""));
60 | //// fragmentList.add(FunctionDetailShortCutFragment.newInstance(opType, ""));
61 | //
62 | // adapter = new ViewPagerAdapter(getSupportFragmentManager(), fragmentList, TITLE);
63 | // vpFunctionDetailSelect.setAdapter(adapter);
64 | //
65 | // //实例化TabPageIndicator然后设置ViewPager与之关联
66 | // tlFunctionDetailSelect.setupWithViewPager(vpFunctionDetailSelect);
67 | //
68 | // //如果我们要对ViewPager设置监听,用indicator设置就行了
69 | // tlFunctionDetailSelect.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
70 | //
71 | // @Override
72 | // public void onTabSelected(TabLayout.Tab tab) {
73 | // vpFunctionDetailSelect.setCurrentItem(tab.getPosition());
74 | // }
75 | //
76 | // @Override
77 | // public void onTabUnselected(TabLayout.Tab tab) {
78 | //
79 | // }
80 | //
81 | // @Override
82 | // public void onTabReselected(TabLayout.Tab tab) {
83 | //
84 | // }
85 | // });
86 |
87 | }
88 |
89 |
90 | // public class ViewPagerAdapter extends FragmentStatePagerAdapter {
91 | // private List fragments;
92 | // private String[] TITLE;
93 | //
94 | // public ViewPagerAdapter(FragmentManager fm, List fragments, String[] TITLE) {
95 | // super(fm);
96 | // this.fragments = fragments;
97 | // this.TITLE = TITLE;
98 | // }
99 | //
100 | //
101 | // @Override
102 | // public Fragment getItem(int position) {
103 | // return fragments.get(position);
104 | // }
105 | //
106 | // @Override
107 | // public int getCount() {
108 | // return TITLE.length;
109 | // }
110 | //
111 | // @Override
112 | // public CharSequence getPageTitle(int position) {
113 | // return TITLE[position];
114 | // }
115 | //
116 | // }
117 |
118 | }
119 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/FunctionSelect/FunctionDetailShortCutFragment.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.FunctionSelect;
2 |
3 |
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.support.annotation.Nullable;
7 | import android.support.v4.app.Fragment;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 |
13 | import com.skkk.easytouch.Bean.AppInfoBean;
14 | import com.skkk.easytouch.R;
15 | import com.skkk.easytouch.Utils.PackageUtils;
16 | import com.skkk.easytouch.View.AppSelect.AppAdapter;
17 | import com.skkk.easytouch.View.BaseAdapter;
18 | import com.skkk.easytouch.View.ScaleRecyclerView;
19 |
20 | import java.util.ArrayList;
21 | import java.util.List;
22 |
23 | import butterknife.Bind;
24 | import butterknife.ButterKnife;
25 |
26 | /**
27 | * A simple {@link Fragment} subclass.
28 | * Use the {@link FunctionDetailShortCutFragment#newInstance} factory method to
29 | * create an instance of this fragment.
30 | */
31 | public class FunctionDetailShortCutFragment extends Fragment {
32 | // TODO: Rename parameter arguments, choose names that match
33 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
34 | private static final String ARG_PARAM1 = "param1";
35 | private static final String ARG_PARAM2 = "param2";
36 | @Bind(R.id.rv_apps)
37 | ScaleRecyclerView rvApps;
38 |
39 | private AppAdapter adapter;
40 | private LinearLayoutManager layoutManager;
41 |
42 | private List allApps;
43 |
44 | // TODO: Rename and change types of parameters
45 | private String mParam1;
46 | private String mParam2;
47 |
48 |
49 | public FunctionDetailShortCutFragment() {
50 | // Required empty public constructor
51 | }
52 |
53 | /**
54 | * Use this factory method to create a new instance of
55 | * this fragment using the provided parameters.
56 | *
57 | * @param param1 Parameter 1.
58 | * @param param2 Parameter 2.
59 | * @return A new instance of fragment FunctionDetailBaseFragment.
60 | */
61 | // TODO: Rename and change types and number of parameters
62 | public static FunctionDetailShortCutFragment newInstance(String param1, String param2) {
63 | FunctionDetailShortCutFragment fragment = new FunctionDetailShortCutFragment();
64 | Bundle args = new Bundle();
65 | args.putString(ARG_PARAM1, param1);
66 | args.putString(ARG_PARAM2, param2);
67 | fragment.setArguments(args);
68 | return fragment;
69 | }
70 |
71 | @Override
72 | public void onCreate(Bundle savedInstanceState) {
73 | super.onCreate(savedInstanceState);
74 | if (getArguments() != null) {
75 | mParam1 = getArguments().getString(ARG_PARAM1);
76 | mParam2 = getArguments().getString(ARG_PARAM2);
77 | }
78 | }
79 |
80 | @Override
81 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
82 | Bundle savedInstanceState) {
83 | // Inflate the layout for this fragment
84 | View view = inflater.inflate(R.layout.fragment_function_detail_app, container, false);
85 | ButterKnife.bind(this, view);
86 | return view;
87 | }
88 |
89 | @Override
90 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
91 | super.onViewCreated(view, savedInstanceState);
92 | allApps = new ArrayList<>();
93 | allApps = PackageUtils.getInstance(getContext().getApplicationContext()).getAllShortCuts();
94 | adapter = new AppAdapter(getContext(), allApps);
95 | layoutManager = new LinearLayoutManager(getContext());
96 | rvApps.setAdapter(adapter);
97 | rvApps.setLayoutManager(layoutManager);
98 | initEvent();
99 | }
100 |
101 | private void initEvent() {
102 | adapter.setOnItemClickListener(new BaseAdapter.OnItemClickListener() {
103 | @Override
104 | public void onItemClick(View v, int pos) {
105 |
106 | }
107 | });
108 | }
109 |
110 | @Override
111 | public void onAttach(Context context) {
112 | super.onAttach(context);
113 | }
114 |
115 | @Override
116 | public void onDetach() {
117 | super.onDetach();
118 | }
119 |
120 | @Override
121 | public void onDestroyView() {
122 | super.onDestroyView();
123 | ButterKnife.unbind(this);
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/fragment_app.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
19 |
20 |
25 |
26 |
34 |
35 |
43 |
44 |
52 |
53 |
58 |
59 |
67 |
68 |
76 |
77 |
85 |
93 |
101 |
102 |
103 |
104 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/FunctionSelect/FunctionDetailAppFragment.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.FunctionSelect;
2 |
3 |
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.support.annotation.Nullable;
7 | import android.support.v4.app.Fragment;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 |
13 | import com.skkk.easytouch.Bean.AppInfoBean;
14 | import com.skkk.easytouch.R;
15 | import com.skkk.easytouch.Utils.PackageUtils;
16 | import com.skkk.easytouch.View.AppSelect.AppAdapter;
17 | import com.skkk.easytouch.View.BaseAdapter;
18 | import com.skkk.easytouch.View.ScaleRecyclerView;
19 |
20 | import java.util.ArrayList;
21 | import java.util.List;
22 |
23 | import butterknife.Bind;
24 | import butterknife.ButterKnife;
25 |
26 | /**
27 | * A simple {@link Fragment} subclass.
28 | * Use the {@link FunctionDetailAppFragment#newInstance} factory method to
29 | * create an instance of this fragment.
30 | */
31 | public class FunctionDetailAppFragment extends Fragment {
32 | // TODO: Rename parameter arguments, choose names that match
33 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
34 | private static final String ARG_PARAM1 = "param1";
35 | private static final String ARG_PARAM2 = "param2";
36 | @Bind(R.id.rv_apps)
37 | ScaleRecyclerView rvApps;
38 |
39 | private AppAdapter adapter;
40 | private LinearLayoutManager layoutManager;
41 |
42 | private List allApps;
43 |
44 | // TODO: Rename and change types of parameters
45 | private String mParam1;
46 | private String mParam2;
47 |
48 |
49 | public FunctionDetailAppFragment() {
50 | // Required empty public constructor
51 | }
52 |
53 | /**
54 | * Use this factory method to create a new instance of
55 | * this fragment using the provided parameters.
56 | *
57 | * @param param1 Parameter 1.
58 | * @param param2 Parameter 2.
59 | * @return A new instance of fragment FunctionDetailBaseFragment.
60 | */
61 | // TODO: Rename and change types and number of parameters
62 | public static FunctionDetailAppFragment newInstance(String param1, String param2) {
63 | FunctionDetailAppFragment fragment = new FunctionDetailAppFragment();
64 | Bundle args = new Bundle();
65 | args.putString(ARG_PARAM1, param1);
66 | args.putString(ARG_PARAM2, param2);
67 | fragment.setArguments(args);
68 | return fragment;
69 | }
70 |
71 | @Override
72 | public void onCreate(Bundle savedInstanceState) {
73 | super.onCreate(savedInstanceState);
74 | if (getArguments() != null) {
75 | mParam1 = getArguments().getString(ARG_PARAM1);
76 | mParam2 = getArguments().getString(ARG_PARAM2);
77 | }
78 | }
79 |
80 | @Override
81 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
82 | Bundle savedInstanceState) {
83 | // Inflate the layout for this fragment
84 | View view = inflater.inflate(R.layout.fragment_function_detail_app, container, false);
85 | ButterKnife.bind(this, view);
86 | return view;
87 | }
88 |
89 | @Override
90 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
91 | super.onViewCreated(view, savedInstanceState);
92 | allApps = new ArrayList<>();
93 | allApps = PackageUtils.getInstance(getContext().getApplicationContext()).getAllApps();
94 | // allApps = PackageUtils.getInstance(getContext().getApplicationContext()).getAllShortCuts();
95 | adapter = new AppAdapter(getContext(), allApps);
96 | layoutManager = new LinearLayoutManager(getContext());
97 | rvApps.setAdapter(adapter);
98 | rvApps.setLayoutManager(layoutManager);
99 | initEvent();
100 | }
101 |
102 | private void initEvent() {
103 | adapter.setOnItemClickListener(new BaseAdapter.OnItemClickListener() {
104 | @Override
105 | public void onItemClick(View v, int pos) {
106 |
107 | }
108 | });
109 | }
110 |
111 | @Override
112 | public void onAttach(Context context) {
113 | super.onAttach(context);
114 | }
115 |
116 | @Override
117 | public void onDetach() {
118 | super.onDetach();
119 | }
120 |
121 | @Override
122 | public void onDestroyView() {
123 | super.onDestroyView();
124 | ButterKnife.unbind(this);
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/java/com/skkk/easytouch/View/ShapeSetting/ShapeSettingActivity.java:
--------------------------------------------------------------------------------
1 | package com.skkk.easytouch.View.ShapeSetting;
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.TabLayout;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentStatePagerAdapter;
7 | import android.support.v4.view.ViewPager;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.support.v7.widget.Toolbar;
10 | import android.view.View;
11 |
12 | import com.skkk.easytouch.MyApplication;
13 | import com.skkk.easytouch.R;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | import butterknife.Bind;
19 | import butterknife.ButterKnife;
20 |
21 | public class ShapeSettingActivity extends AppCompatActivity {
22 |
23 | private static final String TAG = "ShapeSettingActivity";
24 | @Bind(R.id.tb_shape_settings)
25 | Toolbar tbShapeSettings;
26 | @Bind(R.id.tl_setting_shape)
27 | TabLayout tlSettingShape;
28 | @Bind(R.id.vp_setting_shape)
29 | ViewPager vpSettingShape;
30 | private ArrayList fragmentList;
31 | private String[] TITLE=new String[]{"悬浮条","悬浮球"};
32 | private ViewPagerAdapter adapter;
33 |
34 |
35 | @Override
36 | protected void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | setContentView(R.layout.activity_shape_setting);
39 | ButterKnife.bind(this);
40 | initUI();
41 | }
42 |
43 | /**
44 | * 初始化UI
45 | */
46 | private void initUI() {
47 | tbShapeSettings.setTitle("外观设置");
48 | tbShapeSettings.setNavigationOnClickListener(new View.OnClickListener() {
49 | @Override
50 | public void onClick(View v) {
51 | onBackPressed();
52 | }
53 | });
54 | tbShapeSettings.setNavigationIcon(R.drawable.ic_arrow_back_white);
55 |
56 | fragmentList =new ArrayList();
57 | fragmentList.add(TouchLinearShapeFragment.newInstance("",""));
58 | fragmentList.add(TouchBallShapeFragment.newInstance("",""));
59 |
60 | adapter =new ViewPagerAdapter(getSupportFragmentManager(),fragmentList,TITLE);
61 | vpSettingShape.setAdapter(adapter);
62 |
63 | //实例化TabPageIndicator然后设置ViewPager与之关联
64 | tlSettingShape.setupWithViewPager(vpSettingShape);
65 |
66 | //如果我们要对ViewPager设置监听,用indicator设置就行了
67 | tlSettingShape.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
68 |
69 | @Override
70 | public void onTabSelected(TabLayout.Tab tab) {
71 | vpSettingShape.setCurrentItem(tab.getPosition());
72 | }
73 |
74 | @Override
75 | public void onTabUnselected(TabLayout.Tab tab) {
76 |
77 | }
78 |
79 | @Override
80 | public void onTabReselected(TabLayout.Tab tab) {
81 |
82 | }
83 | });
84 |
85 | vpSettingShape.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
86 | @Override
87 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
88 |
89 | }
90 |
91 | @Override
92 | public void onPageSelected(int position) {
93 | if (position==0){
94 | MyApplication.setIsSettingShape(true);
95 | }else {
96 | MyApplication.setIsSettingShape(false);
97 | }
98 | }
99 |
100 | @Override
101 | public void onPageScrollStateChanged(int state) {
102 |
103 | }
104 | });
105 |
106 | }
107 |
108 |
109 |
110 | public class ViewPagerAdapter extends FragmentStatePagerAdapter {
111 | private List fragments;
112 | private String[] TITLE;
113 |
114 | public ViewPagerAdapter(android.support.v4.app.FragmentManager fm,List fragments,String[] TITLE) {
115 | super(fm);
116 | this.fragments=fragments;
117 | this.TITLE=TITLE;
118 | }
119 |
120 |
121 | @Override
122 | public Fragment getItem(int position) {
123 | return fragments.get(position);
124 | }
125 |
126 | @Override
127 | public int getCount() {
128 | return TITLE.length;
129 | }
130 |
131 | @Override
132 | public CharSequence getPageTitle(int position) {
133 | return TITLE[position];
134 | }
135 |
136 | }
137 |
138 | @Override
139 | protected void onStart() {
140 | super.onStart();
141 | //当且仅当当前页面是Linear的时候就设置悬浮条点击事件是设置颜色
142 | if (vpSettingShape.getCurrentItem()==0){
143 | MyApplication.setIsSettingShape(true);
144 | }
145 | }
146 |
147 | @Override
148 | protected void onPause() {
149 | super.onPause();
150 | //当俩开Linear界面的时候还原悬浮条点击事件
151 | MyApplication.setIsSettingShape(false);
152 |
153 | }
154 |
155 | @Override
156 | protected void onDestroy() {
157 | super.onDestroy();
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/EasyTouch/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
32 |
35 |
43 |
44 |
49 |
50 |
60 |
61 |
70 |
71 |
80 |
81 |
90 |
91 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------