├── .gitignore
├── README.md
├── app
├── .gitignore
├── build.gradle
├── libs
│ └── bdasr_V3_20180801_d6f298a.jar
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── baidu_speech_grammar.bsg
│ └── voice
│ │ ├── data.json
│ │ ├── seq_0_0.png
│ │ ├── seq_0_1.png
│ │ ├── seq_0_10.png
│ │ ├── seq_0_11.png
│ │ ├── seq_0_12.png
│ │ ├── seq_0_13.png
│ │ ├── seq_0_14.png
│ │ ├── seq_0_15.png
│ │ ├── seq_0_16.png
│ │ ├── seq_0_17.png
│ │ ├── seq_0_18.png
│ │ ├── seq_0_19.png
│ │ ├── seq_0_2.png
│ │ ├── seq_0_20.png
│ │ ├── seq_0_21.png
│ │ ├── seq_0_22.png
│ │ ├── seq_0_23.png
│ │ ├── seq_0_24.png
│ │ ├── seq_0_25.png
│ │ ├── seq_0_26.png
│ │ ├── seq_0_27.png
│ │ ├── seq_0_28.png
│ │ ├── seq_0_29.png
│ │ ├── seq_0_3.png
│ │ ├── seq_0_30.png
│ │ ├── seq_0_31.png
│ │ ├── seq_0_32.png
│ │ ├── seq_0_33.png
│ │ ├── seq_0_34.png
│ │ ├── seq_0_35.png
│ │ ├── seq_0_36.png
│ │ ├── seq_0_37.png
│ │ ├── seq_0_38.png
│ │ ├── seq_0_39.png
│ │ ├── seq_0_4.png
│ │ ├── seq_0_40.png
│ │ ├── seq_0_41.png
│ │ ├── seq_0_42.png
│ │ ├── seq_0_43.png
│ │ ├── seq_0_44.png
│ │ ├── seq_0_45.png
│ │ ├── seq_0_46.png
│ │ ├── seq_0_47.png
│ │ ├── seq_0_48.png
│ │ ├── seq_0_49.png
│ │ ├── seq_0_5.png
│ │ ├── seq_0_6.png
│ │ ├── seq_0_7.png
│ │ ├── seq_0_8.png
│ │ └── seq_0_9.png
│ ├── java
│ └── com
│ │ └── dfzq
│ │ └── dset
│ │ └── demo
│ │ ├── BaiduRecognizer.java
│ │ └── LoginActivity.java
│ ├── jniLibs
│ ├── armeabi-v7a
│ │ ├── libBaiduSpeechSDK.so
│ │ ├── libbdEASRAndroid.so
│ │ ├── libbdSpilWakeup.so
│ │ ├── libbd_easr_s1_merge_normal_20151216.dat.so
│ │ └── libvad.dnn.so
│ └── armeabi
│ │ ├── libBaiduSpeechSDK.so
│ │ ├── libbdEASRAndroid.so
│ │ ├── libbdSpilWakeup.so
│ │ ├── libbd_easr_s1_merge_normal_20151216.dat.so
│ │ └── libvad.dnn.so
│ └── res
│ ├── drawable
│ ├── clear_search.png
│ ├── dset_keyboard_logo.9.png
│ ├── dset_keyboard_logo_bg_small.xml
│ ├── logo.png
│ ├── shape_corner_3.xml
│ └── stock_search.png
│ ├── layout
│ ├── activity_login.xml
│ └── layout_voice_tips.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── jitpack.yml
├── library
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── dfzq
│ │ │ └── dset
│ │ │ ├── DsetKeyboard.java
│ │ │ ├── KeyboardDialog.java
│ │ │ ├── KeyboardListener.java
│ │ │ ├── KeyboardManager.java
│ │ │ ├── SecurityAutoCompleteEditText.java
│ │ │ ├── SecurityEditText.java
│ │ │ ├── SecurityEditTextDelegate.java
│ │ │ ├── SecurityEditTextInterface.java
│ │ │ ├── ViewUtils.java
│ │ │ ├── VoiceInputStateChangeListener.java
│ │ │ ├── VoiceRecognizer.java
│ │ │ ├── provider
│ │ │ ├── DefaultRecognizer.java
│ │ │ ├── Recognizer.java
│ │ │ └── RecognizerListener.java
│ │ │ └── view
│ │ │ └── SecretKeyboardView.java
│ └── res
│ │ ├── anim
│ │ ├── pop_from_button_down.xml
│ │ └── pop_from_button_up.xml
│ │ ├── drawable-xxhdpi
│ │ ├── arrow_left.png
│ │ ├── dset_keyboard_btn_normal.9.png
│ │ ├── dset_keyboard_btn_press.9.png
│ │ ├── dset_keyboard_voice_speech_off_gray.png
│ │ └── dset_keyboard_voice_speech_on_white.png
│ │ ├── drawable
│ │ ├── btn_selector_bg.xml
│ │ ├── corner_gray_bg.xml
│ │ ├── corner_white_bg.xml
│ │ ├── dset_bg_keyboardview.xml
│ │ ├── dset_btn_keyboard_special_bg.xml
│ │ ├── dset_btn_keyboard_special_normal_bg.xml
│ │ ├── dset_btn_keyboard_special_press_bg.xml
│ │ ├── dset_ic_keyboard_backspace_black_32dp.xml
│ │ ├── dset_ic_keyboard_capslock_lower_32dp.xml
│ │ ├── dset_ic_keyboard_capslock_up_32dp.xml
│ │ ├── dset_ic_keyboard_hide_black_32dp.xml
│ │ ├── dset_keyboard_bolder_bg.xml
│ │ └── dset_keyboard_special_btn_bg.xml
│ │ ├── layout
│ │ ├── dset_keyboard.xml
│ │ ├── dset_keyboard_animattion.xml
│ │ ├── dset_keyboard_layout.xml
│ │ └── dset_keyboard_voice.xml
│ │ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── keys.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ ├── dset_keyboard_abc.xml
│ │ ├── dset_keyboard_id.xml
│ │ ├── dset_keyboard_num.xml
│ │ ├── dset_keyboard_num_only.xml
│ │ ├── dset_keyboard_stock_letter.xml
│ │ └── dset_keyboard_stock_number.xml
│ └── test
│ └── java
│ └── com
│ └── dfzq
│ └── dset
│ └── ExampleUnitTest.java
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SecurityEditText
2 | 自定义文本输入框,支持安全键盘、股票代码
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 33
5 | defaultConfig {
6 | applicationId "com.dfzq.set"
7 | minSdkVersion 21
8 | targetSdkVersion 33
9 | versionCode 1
10 | versionName "1.0.0"
11 | ndk {
12 | abiFilters "armeabi-v7a", "x86"
13 | }
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | testImplementation 'junit:junit:4.13.2'
25 | implementation fileTree(dir: 'libs', include: ['*.jar'])
26 | implementation 'androidx.appcompat:appcompat:1.6.0'
27 | implementation 'com.google.android.material:material:1.8.0'
28 | //implementation 'com.dfzq.android.widget:securitykeyboard:1.3.2'
29 | implementation project(':library')
30 | implementation 'javax.inject:javax.inject:1'
31 | }
32 |
--------------------------------------------------------------------------------
/app/libs/bdasr_V3_20180801_d6f298a.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/libs/bdasr_V3_20180801_d6f298a.jar
--------------------------------------------------------------------------------
/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 H:\android-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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
22 |
25 |
28 |
31 |
32 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/assets/baidu_speech_grammar.bsg:
--------------------------------------------------------------------------------
1 | %7B%0A%20%20%20%20%22version%22%3A%20%220.1%22%2C%0A%20%20%20%20%22slots%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22name%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E5%BC%A0%E4%B8%89%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E6%9D%8E%E5%9B%9B%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E7%8E%8B%E4%BA%94%22%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22appname%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E5%BE%AE%E4%BF%A1%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E7%9F%AD%E4%BF%A1%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%E8%AE%A1%E7%AE%97%E5%99%A8%22%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22msgbody%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22.%2B%22%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22rules%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22telephone.call%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%89%93%E7%94%B5%E8%AF%9D%E7%BB%99%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%89%93%E7%94%B5%E8%AF%9D%E7%BB%99(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%89%93%E7%BB%99%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%89%93%E7%BB%99(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E5%91%BC%E5%8F%AB%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E5%91%BC%E5%8F%AB(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E7%BB%99%3Cname%3E%E6%89%93%E7%94%B5%E8%AF%9D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E7%BB%99(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%E6%89%93%E7%94%B5%E8%AF%9D%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22contacts.view%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%9F%A5%E7%9C%8B%3Cname%3E%E7%9A%84%E7%94%B5%E8%AF%9D%E5%8F%B7%E7%A0%81%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%9F%A5%E7%9C%8B(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%E7%9A%84%E7%94%B5%E8%AF%9D%E5%8F%B7%E7%A0%81%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%9F%A5%E7%9C%8B%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%9F%A5%E7%9C%8B(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22contacts.create%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%96%B0%E5%BB%BA%E8%81%94%E7%B3%BB%E4%BA%BA%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%96%B0%E5%BB%BA%E8%81%94%E7%B3%BB%E4%BA%BA(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22contacts.remove%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E5%88%A0%E9%99%A4%3Cname%3E%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E5%88%A0%E9%99%A4(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22message.view%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%9F%A5%E7%9C%8B%E6%9C%AA%E8%AF%BB%E7%9F%AD%E4%BF%A1%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%9F%A5%E7%9C%8B%E6%9C%AA%E8%AF%BB%E7%9F%AD%E4%BF%A1%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22message.send%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%E5%86%85%E5%AE%B9%E6%98%AF%3Cmsgbody%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99(%E5%BC%A0%E4%B8%89%7C%E6%9D%8E%E5%9B%9B%7C%E7%8E%8B%E4%BA%94)%E5%86%85%E5%AE%B9%E6%98%AF(.%2B)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22msgbody%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22app.open%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%89%93%E5%BC%80%3Cappname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%89%93%E5%BC%80(%E5%BE%AE%E4%BF%A1%7C%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%7C%E7%9F%AD%E4%BF%A1%7C%E8%AE%A1%E7%AE%97%E5%99%A8)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22appname%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E5%90%AF%E5%8A%A8%3Cappname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E5%90%AF%E5%8A%A8(%E5%BE%AE%E4%BF%A1%7C%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%7C%E7%9F%AD%E4%BF%A1%7C%E8%AE%A1%E7%AE%97%E5%99%A8)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22appname%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22app.search%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E6%90%9C%E7%B4%A2%3Cappname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E6%90%9C%E7%B4%A2(%E5%BE%AE%E4%BF%A1%7C%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%7C%E7%9F%AD%E4%BF%A1%7C%E8%AE%A1%E7%AE%97%E5%99%A8)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22appname%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22app.download%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22origin%22%3A%20%22%E4%B8%8B%E8%BD%BD%3Cappname%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pattern%22%3A%20%22%5E%E4%B8%8B%E8%BD%BD(%E5%BE%AE%E4%BF%A1%7C%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%7C%E7%9F%AD%E4%BF%A1%7C%E8%AE%A1%E7%AE%97%E5%99%A8)%24%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22groups%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22appname%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22grammar%22%3A%20%22%3Cname%3E%20%3D%20%E5%BC%A0%E4%B8%89%7C%20%5Cn%E6%9D%8E%E5%9B%9B%7C%20%5Cn%E7%8E%8B%E4%BA%94%3B%5Cn%3Cappname%3E%20%3D%20%E5%BE%AE%E4%BF%A1%7C%20%5Cn%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%7C%20%5Cn%E7%9F%AD%E4%BF%A1%7C%20%5Cn%E8%AE%A1%E7%AE%97%E5%99%A8%3B%5Cn%3Cmsgbody%3E%20%3D%20%E8%AF%8D%E6%9D%A1%E9%BB%98%E8%AE%A4%E5%80%BC%3B%5Cn%3Cauto_create_node%3E%20%3D%20%E6%9F%A5%E7%9C%8B%E6%9C%AA%E8%AF%BB%E7%9F%AD%E4%BF%A1%3B%5Cn%3C_wakeup%3E%20%3D%20%E5%94%A4%E9%86%92%E8%AF%8D%E5%8D%A0%E4%BD%8D%E7%AC%A6%3B%5Cn%5Cn%5Cn_SCENE_ID_%200%5Cn%5Cn(%20%3Cauto_create_node%3E%20)%5Cn%5Cn(%20%3C_wakeup%3E%3Cauto_create_node%3E%20)%5Cn%5Cn(%20%E6%89%93%E7%94%B5%E8%AF%9D%E7%BB%99%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%89%93%E7%94%B5%E8%AF%9D%E7%BB%99%3Cname%3E%20)%5Cn(%20%E6%89%93%E7%BB%99%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%89%93%E7%BB%99%3Cname%3E%20)%5Cn(%20%E5%91%BC%E5%8F%AB%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E5%91%BC%E5%8F%AB%3Cname%3E%20)%5Cn(%20%E7%BB%99%3Cname%3E%E6%89%93%E7%94%B5%E8%AF%9D%20)%5Cn(%20%3C_wakeup%3E%E7%BB%99%3Cname%3E%E6%89%93%E7%94%B5%E8%AF%9D%20)%5Cn(%20%E6%9F%A5%E7%9C%8B%3Cname%3E%E7%9A%84%E7%94%B5%E8%AF%9D%E5%8F%B7%E7%A0%81%20)%5Cn(%20%3C_wakeup%3E%E6%9F%A5%E7%9C%8B%3Cname%3E%E7%9A%84%E7%94%B5%E8%AF%9D%E5%8F%B7%E7%A0%81%20)%5Cn(%20%E6%9F%A5%E7%9C%8B%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%9F%A5%E7%9C%8B%3Cname%3E%20)%5Cn(%20%E6%96%B0%E5%BB%BA%E8%81%94%E7%B3%BB%E4%BA%BA%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%96%B0%E5%BB%BA%E8%81%94%E7%B3%BB%E4%BA%BA%3Cname%3E%20)%5Cn(%20%E5%88%A0%E9%99%A4%3Cname%3E%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%20)%5Cn(%20%3C_wakeup%3E%E5%88%A0%E9%99%A4%3Cname%3E%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%20)%5Cn(%20%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%20)%5Cn(%20%3C_wakeup%3E%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%20)%5Cn(%20%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%E5%86%85%E5%AE%B9%E6%98%AF%3Cmsgbody%3E%20)%5Cn(%20%3C_wakeup%3E%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%E5%86%85%E5%AE%B9%E6%98%AF%3Cmsgbody%3E%20)%5Cn(%20%E6%89%93%E5%BC%80%3Cappname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%89%93%E5%BC%80%3Cappname%3E%20)%5Cn(%20%E5%90%AF%E5%8A%A8%3Cappname%3E%20)%5Cn(%20%3C_wakeup%3E%E5%90%AF%E5%8A%A8%3Cappname%3E%20)%5Cn(%20%E6%90%9C%E7%B4%A2%3Cappname%3E%20)%5Cn(%20%3C_wakeup%3E%E6%90%9C%E7%B4%A2%3Cappname%3E%20)%5Cn(%20%E4%B8%8B%E8%BD%BD%3Cappname%3E%20)%5Cn(%20%3C_wakeup%3E%E4%B8%8B%E8%BD%BD%3Cappname%3E%20)%5Cn%22%2C%0A%20%20%20%20%22origin_slots%22%3A%20%22name%20%3D%20%E5%BC%A0%E4%B8%89%2C%20%E6%9D%8E%E5%9B%9B%2C%20%E7%8E%8B%E4%BA%94%5Cnappname%20%3D%20%E5%BE%AE%E4%BF%A1%2C%20%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%2C%20%E7%9F%AD%E4%BF%A1%2C%20%E8%AE%A1%E7%AE%97%E5%99%A8%5Cnmsgbody%20%3D%20*%22%2C%0A%20%20%20%20%22origin_rules%22%3A%20%22telephone.call%20%20%20%20%20%3D%20%E6%89%93%E7%94%B5%E8%AF%9D%E7%BB%99%3Cname%3E%2C%20%E6%89%93%E7%BB%99%3Cname%3E%2C%20%E5%91%BC%E5%8F%AB%3Cname%3E%2C%E7%BB%99%3Cname%3E%E6%89%93%E7%94%B5%E8%AF%9D%5Cncontacts.view%20%20%20%20%20%3D%20%E6%9F%A5%E7%9C%8B%3Cname%3E%E7%9A%84%E7%94%B5%E8%AF%9D%E5%8F%B7%E7%A0%81%2C%20%E6%9F%A5%E7%9C%8B%3Cname%3E%5Cncontacts.create%20%20%3D%20%E6%96%B0%E5%BB%BA%E8%81%94%E7%B3%BB%E4%BA%BA%3Cname%3E%5Cncontacts.remove%3D%20%E5%88%A0%E9%99%A4%3Cname%3E%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%5Cnmessage.view%20%20%20%20%20%3D%20%E6%9F%A5%E7%9C%8B%E6%9C%AA%E8%AF%BB%E7%9F%AD%E4%BF%A1%5Cnmessage.send%20%20%20%20%3D%20%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%2C%20%E5%8F%91%E7%9F%AD%E4%BF%A1%E7%BB%99%3Cname%3E%E5%86%85%E5%AE%B9%E6%98%AF%3Cmsgbody%3E%5Cnapp.open%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%E6%89%93%E5%BC%80%3Cappname%3E%2C%20%E5%90%AF%E5%8A%A8%3Cappname%3E%5Cnapp.search%20%20%20%20%20%20%20%20%20%3D%20%E6%90%9C%E7%B4%A2%3Cappname%3E%5Cnapp.download%20%20%20%20%3D%20%E4%B8%8B%E8%BD%BD%3Cappname%3E%22%0A%7D
--------------------------------------------------------------------------------
/app/src/main/assets/voice/data.json:
--------------------------------------------------------------------------------
1 | {"v":"5.6.3","fr":30,"ip":0,"op":50,"w":720,"h":60,"nm":"波浪","ddd":0,"assets":[{"id":"imgSeq_0","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_0.png","e":0},{"id":"imgSeq_1","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_1.png","e":0},{"id":"imgSeq_2","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_2.png","e":0},{"id":"imgSeq_3","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_3.png","e":0},{"id":"imgSeq_4","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_4.png","e":0},{"id":"imgSeq_5","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_5.png","e":0},{"id":"imgSeq_6","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_6.png","e":0},{"id":"imgSeq_7","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_7.png","e":0},{"id":"imgSeq_8","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_8.png","e":0},{"id":"imgSeq_9","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_9.png","e":0},{"id":"imgSeq_10","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_10.png","e":0},{"id":"imgSeq_11","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_11.png","e":0},{"id":"imgSeq_12","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_12.png","e":0},{"id":"imgSeq_13","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_13.png","e":0},{"id":"imgSeq_14","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_14.png","e":0},{"id":"imgSeq_15","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_15.png","e":0},{"id":"imgSeq_16","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_16.png","e":0},{"id":"imgSeq_17","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_17.png","e":0},{"id":"imgSeq_18","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_18.png","e":0},{"id":"imgSeq_19","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_19.png","e":0},{"id":"imgSeq_20","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_20.png","e":0},{"id":"imgSeq_21","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_21.png","e":0},{"id":"imgSeq_22","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_22.png","e":0},{"id":"imgSeq_23","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_23.png","e":0},{"id":"imgSeq_24","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_24.png","e":0},{"id":"imgSeq_25","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_25.png","e":0},{"id":"imgSeq_26","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_26.png","e":0},{"id":"imgSeq_27","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_27.png","e":0},{"id":"imgSeq_28","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_28.png","e":0},{"id":"imgSeq_29","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_29.png","e":0},{"id":"imgSeq_30","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_30.png","e":0},{"id":"imgSeq_31","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_31.png","e":0},{"id":"imgSeq_32","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_32.png","e":0},{"id":"imgSeq_33","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_33.png","e":0},{"id":"imgSeq_34","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_34.png","e":0},{"id":"imgSeq_35","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_35.png","e":0},{"id":"imgSeq_36","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_36.png","e":0},{"id":"imgSeq_37","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_37.png","e":0},{"id":"imgSeq_38","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_38.png","e":0},{"id":"imgSeq_39","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_39.png","e":0},{"id":"imgSeq_40","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_40.png","e":0},{"id":"imgSeq_41","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_41.png","e":0},{"id":"imgSeq_42","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_42.png","e":0},{"id":"imgSeq_43","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_43.png","e":0},{"id":"imgSeq_44","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_44.png","e":0},{"id":"imgSeq_45","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_45.png","e":0},{"id":"imgSeq_46","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_46.png","e":0},{"id":"imgSeq_47","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_47.png","e":0},{"id":"imgSeq_48","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_48.png","e":0},{"id":"imgSeq_49","w":720,"h":60,"t":"seq","u":"images/","p":"seq_0_49.png","e":0},{"id":"sequence_0","layers":[{"ty":2,"sc":"#00ffff","refId":"imgSeq_0","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":0,"st":0,"op":1,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_1","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":1,"st":1,"op":2,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_2","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":2,"st":2,"op":3,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_3","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":3,"st":3,"op":4,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_4","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":4,"st":4,"op":5,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_5","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":5,"st":5,"op":6,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_6","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":6,"st":6,"op":7,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_7","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":7,"st":7,"op":8,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_8","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":8,"st":8,"op":9,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_9","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":9,"st":9,"op":10,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_10","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":10,"st":10,"op":11,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_11","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":11,"st":11,"op":12,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_12","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":12,"st":12,"op":13,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_13","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":13,"st":13,"op":14,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_14","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":14,"st":14,"op":15,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_15","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":15,"st":15,"op":16,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_16","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":16,"st":16,"op":17,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_17","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":17,"st":17,"op":18,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_18","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":18,"st":18,"op":19,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_19","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":19,"st":19,"op":20,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_20","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":20,"st":20,"op":21,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_21","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":21,"st":21,"op":22,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_22","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":22,"st":22,"op":23,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_23","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":23,"st":23,"op":24,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_24","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":24,"st":24,"op":25,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_25","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":25,"st":25,"op":26,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_26","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":26,"st":26,"op":27,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_27","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":27,"st":27,"op":28,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_28","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":28,"st":28,"op":29,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_29","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":29,"st":29,"op":30,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_30","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":30,"st":30,"op":31,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_31","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":31,"st":31,"op":32,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_32","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":32,"st":32,"op":33,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_33","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":33,"st":33,"op":34,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_34","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":34,"st":34,"op":35,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_35","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":35,"st":35,"op":36,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_36","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":36,"st":36,"op":37,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_37","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":37,"st":37,"op":38,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_38","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":38,"st":38,"op":39,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_39","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":39,"st":39,"op":40,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_40","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":40,"st":40,"op":41,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_41","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":41,"st":41,"op":42,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_42","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":42,"st":42,"op":43,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_43","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":43,"st":43,"op":44,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_44","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":44,"st":44,"op":45,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_45","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":45,"st":45,"op":46,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_46","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":46,"st":46,"op":47,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_47","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":47,"st":47,"op":48,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_48","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":48,"st":48,"op":49,"sr":1,"bm":0},{"ty":2,"sc":"#00ffff","refId":"imgSeq_49","ks":{"p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":[0]},"o":{"a":0,"k":[100]}},"ip":49,"st":49,"op":51,"sr":1,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"波浪_[00000-00049].png","cl":"png","refId":"sequence_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[360,30,0],"ix":2},"a":{"a":0,"k":[360,30,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":720,"h":60,"ip":0,"op":50,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_0.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_1.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_10.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_11.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_12.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_13.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_14.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_15.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_16.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_17.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_18.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_19.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_2.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_20.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_21.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_22.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_23.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_24.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_25.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_26.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_27.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_28.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_29.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_3.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_30.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_31.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_32.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_33.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_34.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_35.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_36.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_37.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_38.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_39.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_4.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_40.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_41.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_42.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_43.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_43.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_44.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_45.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_46.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_47.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_48.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_49.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_49.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_5.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_6.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_7.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_8.png
--------------------------------------------------------------------------------
/app/src/main/assets/voice/seq_0_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/assets/voice/seq_0_9.png
--------------------------------------------------------------------------------
/app/src/main/java/com/dfzq/dset/demo/BaiduRecognizer.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.demo;
2 |
3 | import android.content.Context;
4 |
5 | import com.baidu.speech.EventListener;
6 | import com.baidu.speech.EventManager;
7 | import com.baidu.speech.EventManagerFactory;
8 | import com.baidu.speech.asr.SpeechConstant;
9 | import com.dfzq.dset.provider.Recognizer;
10 | import com.dfzq.dset.provider.RecognizerListener;
11 |
12 | import org.json.JSONArray;
13 | import org.json.JSONException;
14 | import org.json.JSONObject;
15 |
16 | import java.lang.ref.WeakReference;
17 | import java.util.LinkedHashMap;
18 | import java.util.Map;
19 |
20 | public class BaiduRecognizer implements Recognizer {
21 | private PermissionListener permissionListener;
22 | private static final class BaiduListener implements EventListener {
23 | private WeakReference listenerWeakReference;
24 | private static final BaiduListener instance = new BaiduListener();
25 |
26 | void setRecognizerListener(RecognizerListener listener) {
27 | listenerWeakReference = new WeakReference<>(listener);
28 | }
29 |
30 | @Override
31 | public void onEvent(String name, String params, byte[] data, int offset, int length) {
32 | RecognizerListener listener = null;
33 | if (listenerWeakReference != null) {
34 | listener = listenerWeakReference.get();
35 | }
36 | if (listener == null) return;
37 | if (params != null) {
38 | try {
39 | JSONObject obj = new JSONObject(params);
40 | JSONArray result = obj.optJSONArray("results_recognition");
41 | int error = obj.optInt("sub_error");
42 | if (result != null && result.length() > 0) {
43 | listener.onSuccess(result.get(0).toString());
44 | }
45 | if (3001 == error) {
46 | listener.onNoPermission();
47 | }
48 | if (0 != error) {
49 | listener.onFailure("", error);
50 | }
51 | } catch (JSONException e) {
52 | e.printStackTrace();
53 | }
54 | if (name.equals(SpeechConstant.CALLBACK_EVENT_ASR_VOLUME)) {
55 | //音量变化
56 | try {
57 | JSONObject json = new JSONObject(params);
58 | int volumePercent = json.getInt("volume-percent");
59 | listener.onVolumeChange(volumePercent);
60 | } catch (JSONException e) {
61 | e.printStackTrace();
62 | }
63 | }
64 | }
65 | if (name.equals(SpeechConstant.CALLBACK_EVENT_ASR_EXIT)) {
66 | listener.onExit();
67 | }
68 |
69 | }
70 | }
71 |
72 | private final EventManager asr;
73 |
74 | public BaiduRecognizer(Context context, PermissionListener permissionListener) {
75 | asr = EventManagerFactory.create(context, "asr");
76 | asr.registerListener(BaiduListener.instance);
77 | this.permissionListener = permissionListener;
78 | loadOfflineEngine();
79 | }
80 |
81 | private void loadOfflineEngine() {
82 | Map params = new LinkedHashMap<>();
83 | params.put(SpeechConstant.DECODER, 2);
84 | params.put(SpeechConstant.ASR_OFFLINE_ENGINE_GRAMMER_FILE_PATH, "assets://baidu_speech_grammar.bsg");
85 | asr.send(SpeechConstant.ASR_KWS_LOAD_ENGINE, new JSONObject(params).toString(), null, 0, 0);
86 | }
87 |
88 | @Override
89 | public void requestPermission() {
90 | permissionListener.requestPermission();
91 | }
92 |
93 | @Override
94 | public void cancel() {
95 | if (asr != null) {
96 | asr.send(SpeechConstant.ASR_CANCEL, "{}", null, 0, 0);
97 | unloadOfflineEngine();
98 | }
99 | }
100 |
101 | private void unloadOfflineEngine() {
102 | asr.send(SpeechConstant.ASR_KWS_UNLOAD_ENGINE, null, null, 0, 0);
103 | }
104 |
105 | @Override
106 | public void startVoice() {
107 | Map params = new LinkedHashMap<>();
108 | String event;
109 | event = SpeechConstant.ASR_START;
110 | params.put(SpeechConstant.DECODER, 2);
111 | params.put(SpeechConstant.ACCEPT_AUDIO_VOLUME, true);
112 | String json = new JSONObject(params).toString();
113 | asr.send(event, json, null, 0, 0);
114 | }
115 |
116 | @Override
117 | public void stopVoice() {
118 | asr.send(SpeechConstant.ASR_STOP, null, null, 0, 0);
119 | }
120 |
121 | @Override
122 | public void setRecognizerListener(RecognizerListener listener) {
123 | BaiduListener.instance.setRecognizerListener(listener);
124 | }
125 |
126 | interface PermissionListener {
127 | void requestPermission();
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/java/com/dfzq/dset/demo/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.demo;
2 |
3 | import static android.Manifest.permission.READ_CONTACTS;
4 |
5 | import android.Manifest;
6 | import android.animation.Animator;
7 | import android.animation.AnimatorListenerAdapter;
8 | import android.app.LoaderManager.LoaderCallbacks;
9 | import android.content.CursorLoader;
10 | import android.content.Loader;
11 | import android.content.pm.PackageManager;
12 | import android.database.Cursor;
13 | import android.net.Uri;
14 | import android.os.AsyncTask;
15 | import android.os.Build;
16 | import android.os.Bundle;
17 | import android.provider.ContactsContract;
18 | import android.text.TextUtils;
19 | import android.view.LayoutInflater;
20 | import android.view.View;
21 | import android.view.ViewGroup;
22 | import android.view.inputmethod.EditorInfo;
23 | import android.widget.ArrayAdapter;
24 | import android.widget.AutoCompleteTextView;
25 | import android.widget.Button;
26 | import android.widget.EditText;
27 | import android.widget.FrameLayout;
28 | import android.widget.PopupWindow;
29 | import android.widget.Toast;
30 |
31 | import androidx.annotation.NonNull;
32 | import androidx.appcompat.app.AppCompatActivity;
33 | import androidx.core.app.ActivityCompat;
34 |
35 | import com.dfzq.dset.KeyboardManager;
36 | import com.dfzq.dset.SecurityEditText;
37 | import com.dfzq.dset.VoiceInputStateChangeListener;
38 | import com.google.android.material.snackbar.Snackbar;
39 |
40 | import java.lang.ref.WeakReference;
41 | import java.util.ArrayList;
42 | import java.util.List;
43 |
44 | /**
45 | * A login screen that offers login via email/password.
46 | */
47 | public class LoginActivity extends AppCompatActivity implements LoaderCallbacks {
48 |
49 | /**
50 | * Id to identity READ_CONTACTS permission request.
51 | */
52 | private static final int REQUEST_READ_CONTACTS = 0;
53 | private static final int REQUEST_RECORD_AUDIO = 114;
54 |
55 | /**
56 | * A dummy authentication store containing known user names and passwords.
57 | * TODO: remove after connecting to a real authentication system.
58 | */
59 | private static final String[] DUMMY_CREDENTIALS = new String[]{
60 | "foo@example.com:hello", "bar@example.com:world"
61 | };
62 | /**
63 | * Keep track of the login task to ensure we can cancel it if requested.
64 | */
65 | private UserLoginTask mAuthTask = null;
66 |
67 | // UI references.
68 | private AutoCompleteTextView mEmailView;
69 | private EditText mPasswordView;
70 | private View mProgressView;
71 | private View mLoginFormView;
72 | //private SecurityEditText voiceEditText;
73 |
74 | private SecurityEditText codeText;
75 | private PopupWindow popupWindow;
76 | private View layoutVoiceTips;
77 | private View layoutVoiceFail;
78 |
79 | @Override
80 | protected void onCreate(Bundle savedInstanceState) {
81 | super.onCreate(savedInstanceState);
82 | setContentView(R.layout.activity_login);
83 | KeyboardManager.logo = R.drawable.dset_keyboard_logo_bg_small;
84 | KeyboardManager.getInstance().setProvider(() -> new BaiduRecognizer(LoginActivity.this, () -> {
85 | ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, REQUEST_RECORD_AUDIO);
86 | }));
87 | KeyboardManager.assetsFolder = "voice/";
88 | KeyboardManager.animationName = "voice/data.json";
89 | // Set up the login form.
90 | mEmailView = findViewById(R.id.email);
91 | initVoice();
92 | //voiceEditText = findViewById(R.id.voice);
93 | mPasswordView = findViewById(R.id.password);
94 | mPasswordView.setOnEditorActionListener((textView, id, keyEvent) -> {
95 | if (id == EditorInfo.IME_NULL) {
96 | attemptLogin();
97 | return true;
98 | }
99 | return false;
100 | });
101 |
102 | Button mEmailSignInButton = findViewById(R.id.email_sign_in_button);
103 | mEmailSignInButton.setOnClickListener(view -> attemptLogin());
104 |
105 | mLoginFormView = findViewById(R.id.login_form);
106 | mProgressView = findViewById(R.id.login_progress);
107 | }
108 |
109 | private void initVoice() {
110 | codeText = findViewById(R.id.code_edit);
111 | View view = LayoutInflater.from(this).inflate(R.layout.layout_voice_tips, new FrameLayout(this), false);
112 | layoutVoiceTips = view.findViewById(R.id.ll_voice_tips);
113 | layoutVoiceFail = view.findViewById(R.id.ll_voice_fail);
114 | popupWindow = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
115 | codeText.setVoiceInputStateChangeListener(new VoiceInputStateChangeListener() {
116 | @Override
117 | public void onStateChanged(int state) {
118 | if (1 == state) {
119 | popupWindow.showAsDropDown(codeText);
120 | } else {
121 | popupWindow.dismiss();
122 | }
123 | }
124 |
125 | @Override
126 | public void onErrorState(int error) {
127 | voiceShow(3001 != error);
128 | }
129 | });
130 |
131 | }
132 |
133 | private void voiceShow(boolean tips) {
134 | if (layoutVoiceTips != null && layoutVoiceFail != null) {
135 | if (tips) {
136 | layoutVoiceTips.setVisibility(View.VISIBLE);
137 | layoutVoiceFail.setVisibility(View.GONE);
138 | } else {
139 | layoutVoiceTips.setVisibility(View.GONE);
140 | layoutVoiceFail.setVisibility(View.VISIBLE);
141 | Toast.makeText(this, "请开启录音权限", Toast.LENGTH_SHORT).show();
142 | }
143 | }
144 | }
145 |
146 | private void populateAutoComplete() {
147 | if (!mayRequestContacts()) {
148 | return;
149 | }
150 |
151 | getLoaderManager().initLoader(0, null, this);
152 | }
153 |
154 | private boolean mayRequestContacts() {
155 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
156 | return true;
157 | }
158 | if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
159 | return true;
160 | }
161 | if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
162 | Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
163 | .setAction(android.R.string.ok, v -> requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS))
164 | .show();
165 |
166 | } else {
167 | requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
168 | }
169 | return false;
170 | }
171 |
172 | /**
173 | * Callback received when a permissions request has been completed.
174 | */
175 | @Override
176 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
177 | @NonNull int[] grantResults) {
178 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
179 | if (requestCode == REQUEST_READ_CONTACTS) {
180 | if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
181 | populateAutoComplete();
182 | }
183 | } else if (requestCode == REQUEST_RECORD_AUDIO) {
184 | voiceShow(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED);
185 | }
186 | }
187 |
188 | @Override
189 | protected void onDestroy() {
190 | super.onDestroy();
191 | if (mAuthTask != null) {
192 | mAuthTask.clean();
193 | }
194 | }
195 |
196 | /**
197 | * Attempts to sign in or register the account specified by the login form.
198 | * If there are form errors (invalid email, missing fields, etc.), the
199 | * errors are presented and no actual login attempt is made.
200 | */
201 | private void attemptLogin() {
202 | if (mAuthTask != null) {
203 | return;
204 | }
205 |
206 | // Reset errors.
207 | mEmailView.setError(null);
208 | mPasswordView.setError(null);
209 |
210 | // Store values at the time of the login attempt.
211 | String email = mEmailView.getText().toString();
212 | String password = mPasswordView.getText().toString();
213 |
214 | boolean cancel = false;
215 | View focusView = null;
216 |
217 | // Check for a valid password, if the user entered one.
218 | if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
219 | mPasswordView.setError(getString(R.string.error_invalid_password));
220 | focusView = mPasswordView;
221 | cancel = true;
222 | }
223 |
224 | // Check for a valid email address.
225 | if (TextUtils.isEmpty(email)) {
226 | mEmailView.setError(getString(R.string.error_field_required));
227 | focusView = mEmailView;
228 | cancel = true;
229 | } else if (!isEmailValid(email)) {
230 | mEmailView.setError(getString(R.string.error_invalid_email));
231 | focusView = mEmailView;
232 | cancel = true;
233 | }
234 |
235 | if (cancel) {
236 | // There was an error; don't attempt login and focus the first
237 | // form field with an error.
238 | focusView.requestFocus();
239 | } else {
240 | // Show a progress spinner, and kick off a background task to
241 | // perform the user login attempt.
242 | showProgress(true);
243 | mAuthTask = new UserLoginTask(email, password, this);
244 | mAuthTask.execute((Void) null);
245 | }
246 | }
247 |
248 | private boolean isEmailValid(String email) {
249 | //TODO: Replace this with your own logic
250 | return email.contains("@");
251 | }
252 |
253 | private boolean isPasswordValid(String password) {
254 | //TODO: Replace this with your own logic
255 | return password.length() > 4;
256 | }
257 |
258 | /**
259 | * Shows the progress UI and hides the login form.
260 | */
261 | private void showProgress(final boolean show) {
262 | // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
263 | // for very easy animations. If available, use these APIs to fade-in
264 | // the progress spinner.
265 | int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
266 |
267 | mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
268 | mLoginFormView.animate().setDuration(shortAnimTime).alpha(
269 | show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
270 | @Override
271 | public void onAnimationEnd(Animator animation) {
272 | mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
273 | }
274 | });
275 |
276 | mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
277 | mProgressView.animate().setDuration(shortAnimTime).alpha(
278 | show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
279 | @Override
280 | public void onAnimationEnd(Animator animation) {
281 | mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
282 | }
283 | });
284 | }
285 |
286 | @Override
287 | public Loader onCreateLoader(int i, Bundle bundle) {
288 | return new CursorLoader(this,
289 | // Retrieve data rows for the device user's 'profile' contact.
290 | Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
291 | ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
292 |
293 | // Select only email addresses.
294 | ContactsContract.Contacts.Data.MIMETYPE +
295 | " = ?", new String[]{ContactsContract.CommonDataKinds.Email
296 | .CONTENT_ITEM_TYPE},
297 |
298 | // Show primary email addresses first. Note that there won't be
299 | // a primary email address if the user hasn't specified one.
300 | ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
301 | }
302 |
303 | @Override
304 | public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
305 | List emails = new ArrayList<>();
306 | cursor.moveToFirst();
307 | while (!cursor.isAfterLast()) {
308 | emails.add(cursor.getString(ProfileQuery.ADDRESS));
309 | cursor.moveToNext();
310 | }
311 |
312 | addEmailsToAutoComplete(emails);
313 | }
314 |
315 | @Override
316 | public void onLoaderReset(Loader cursorLoader) {
317 |
318 | }
319 |
320 | private void addEmailsToAutoComplete(List emailAddressCollection) {
321 | //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
322 | ArrayAdapter adapter =
323 | new ArrayAdapter<>(LoginActivity.this,
324 | android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
325 |
326 | mEmailView.setAdapter(adapter);
327 | }
328 |
329 |
330 | private interface ProfileQuery {
331 | String[] PROJECTION = {
332 | ContactsContract.CommonDataKinds.Email.ADDRESS,
333 | ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
334 | };
335 |
336 | int ADDRESS = 0;
337 | //int IS_PRIMARY = 1;
338 | }
339 |
340 | private void onExecuted(boolean success) {
341 | mAuthTask = null;
342 | showProgress(false);
343 |
344 | if (success) {
345 | finish();
346 | } else {
347 | mPasswordView.setError(getString(R.string.error_incorrect_password));
348 | mPasswordView.requestFocus();
349 | }
350 | }
351 |
352 | private void onCanceled() {
353 | mAuthTask = null;
354 | showProgress(false);
355 | }
356 |
357 | /**
358 | * Represents an asynchronous login/registration task used to authenticate
359 | * the user.
360 | */
361 | static class UserLoginTask extends AsyncTask {
362 | private WeakReference loginActivity;
363 |
364 | private final String mEmail;
365 | private final String mPassword;
366 |
367 | UserLoginTask(String email, String password, LoginActivity loginActivity) {
368 | super();
369 | mEmail = email;
370 | mPassword = password;
371 | this.loginActivity = new WeakReference<>(loginActivity);
372 | }
373 |
374 | void clean() {
375 | loginActivity = null;
376 | }
377 |
378 | @Override
379 | protected Boolean doInBackground(Void... params) {
380 | // TODO: attempt authentication against a network service.
381 |
382 | try {
383 | // Simulate network access.
384 | Thread.sleep(2000);
385 | } catch (InterruptedException e) {
386 | return false;
387 | }
388 |
389 | for (String credential : DUMMY_CREDENTIALS) {
390 | String[] pieces = credential.split(":");
391 | if (pieces[0].equals(mEmail)) {
392 | // Account exists, return true if the password matches.
393 | return pieces[1].equals(mPassword);
394 | }
395 | }
396 |
397 | // TODO: register the new account here.
398 | return true;
399 | }
400 |
401 | @Override
402 | protected void onPostExecute(final Boolean success) {
403 | LoginActivity activity;
404 | if (loginActivity != null && (activity = loginActivity.get()) != null) {
405 | activity.onExecuted(success);
406 | }
407 | }
408 |
409 | @Override
410 | protected void onCancelled() {
411 | LoginActivity activity;
412 | if (loginActivity != null && (activity = loginActivity.get()) != null) {
413 | activity.onCanceled();
414 | }
415 | }
416 | }
417 | }
418 |
419 |
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libBaiduSpeechSDK.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi-v7a/libBaiduSpeechSDK.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libbdEASRAndroid.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi-v7a/libbdEASRAndroid.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libbdSpilWakeup.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi-v7a/libbdSpilWakeup.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libbd_easr_s1_merge_normal_20151216.dat.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi-v7a/libbd_easr_s1_merge_normal_20151216.dat.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libvad.dnn.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi-v7a/libvad.dnn.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libBaiduSpeechSDK.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi/libBaiduSpeechSDK.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libbdEASRAndroid.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi/libbdEASRAndroid.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libbdSpilWakeup.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi/libbdSpilWakeup.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libbd_easr_s1_merge_normal_20151216.dat.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi/libbd_easr_s1_merge_normal_20151216.dat.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libvad.dnn.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/jniLibs/armeabi/libvad.dnn.so
--------------------------------------------------------------------------------
/app/src/main/res/drawable/clear_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/drawable/clear_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dset_keyboard_logo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/drawable/dset_keyboard_logo.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dset_keyboard_logo_bg_small.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_corner_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/stock_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/drawable/stock_search.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
22 |
23 |
27 |
28 |
32 |
33 |
44 |
45 |
51 |
52 |
67 |
68 |
76 |
77 |
78 |
81 |
82 |
92 |
93 |
94 |
95 |
98 |
99 |
108 |
109 |
110 |
111 |
114 |
115 |
125 |
126 |
127 |
128 |
131 |
132 |
139 |
140 |
141 |
142 |
150 |
151 |
152 |
153 |
154 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_voice_tips.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
21 |
22 |
29 |
30 |
37 |
38 |
45 |
46 |
47 |
48 |
56 |
57 |
63 |
64 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SecurityEditText
3 |
4 |
5 | Email
6 | Password (optional)
7 | Sign in or register
8 | Sign in
9 | This email address is invalid
10 | This password is too short
11 | This password is incorrect
12 | This field is required
13 | "Contacts permissions are needed for providing email
14 | completions."
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/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 | google()
6 | mavenCentral()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.2'
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 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | android.enableJetifier=true
10 | android.useAndroidX=true
11 | org.gradle.jvmargs=-Xmx1536m
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 16 10:00:42 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-7.5-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/jitpack.yml:
--------------------------------------------------------------------------------
1 | jdk:
2 | - openjdk11
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 33
5 |
6 | defaultConfig {
7 | minSdkVersion 21
8 | targetSdkVersion 33
9 | versionCode 1
10 | versionName "1.3.9"
11 |
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 |
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | lintOptions {
22 | abortOnError false
23 | }
24 | }
25 |
26 | dependencies {
27 | testImplementation 'junit:junit:4.13.2'
28 | implementation 'androidx.appcompat:appcompat:1.6.1'
29 | implementation 'com.airbnb.android:lottie:6.1.0'
30 | implementation 'javax.inject:javax.inject:1'
31 | }
32 |
--------------------------------------------------------------------------------
/library/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 H:\android-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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/DsetKeyboard.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Handler;
6 | import android.os.Looper;
7 | import android.os.Message;
8 | import android.text.TextUtils;
9 | import android.view.Gravity;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.view.Window;
14 | import android.view.WindowManager;
15 | import android.widget.EditText;
16 | import android.widget.FrameLayout;
17 | import android.widget.PopupWindow;
18 | import android.widget.TextView;
19 |
20 | import androidx.annotation.NonNull;
21 |
22 | import com.airbnb.lottie.LottieAnimationView;
23 | import com.dfzq.dset.view.SecretKeyboardView;
24 |
25 | import java.util.Arrays;
26 | import java.util.List;
27 |
28 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_ID;
29 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_NUM;
30 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_NUM_ONLY;
31 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_STOCK_LETTER;
32 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_STOCK_NUM;
33 |
34 | /**
35 | * Created by meihu on 2017/3/17.
36 | */
37 |
38 | class DsetKeyboard {
39 | private SecretKeyboardView keyboardView;
40 | private final View voiceLayout;
41 | private final ViewGroup frameLayout;
42 | private Dialog dialog;
43 | private EditText editText;
44 | private final Context context;
45 | private final VoiceRecognizer recognizer;
46 | private PopupWindow popupWindow;
47 | private LottieAnimationView animationView;
48 | private final Handler handler = new Handler(Looper.getMainLooper()) {
49 | @Override
50 | public void handleMessage(@NonNull Message msg) {
51 | super.handleMessage(msg);
52 | try {
53 | switch (msg.what) {
54 | case 1:
55 | dialog.show();
56 | break;
57 | case 2:
58 | dialog.dismiss();
59 | break;
60 | }
61 | } catch (Exception e) {
62 | e.printStackTrace();
63 | }
64 | }
65 | };
66 |
67 | EditText getFocus() {
68 | return editText;
69 | }
70 |
71 | DsetKeyboard(Context context) {
72 | this.context = context;
73 | dialog = new KeyboardDialog(context, R.style.dsetKeyboardDialog);
74 | voiceLayout = dialog.findViewById(R.id.voice_layout);
75 | View btnVoice = dialog.findViewById(R.id.btn_voice);
76 | dialog.findViewById(R.id.rl_switch_system_keyboard).setOnClickListener(v -> {
77 | if (editText != null && editText instanceof SecurityEditTextInterface) {
78 | ((SecurityEditTextInterface) editText).switchSoftKeyboardWithSystem();
79 | }
80 | });
81 | TextView changeTv = dialog.findViewById(R.id.rl_switch_system_keyboard);
82 | frameLayout = dialog.findViewById(R.id.keyboard_view);
83 | recognizer = new VoiceRecognizer(btnVoice, changeTv);
84 | }
85 |
86 | DsetKeyboard(ViewGroup parent) {
87 | this.context = parent.getContext();
88 | LayoutInflater.from(context).inflate(R.layout.dset_keyboard_layout, parent);
89 | voiceLayout = parent.findViewById(R.id.voice_layout);
90 | View btnVoice = parent.findViewById(R.id.btn_voice);
91 | parent.findViewById(R.id.rl_switch_system_keyboard).setOnClickListener(v -> {
92 | if (editText != null && editText instanceof SecurityEditTextInterface) {
93 | ((SecurityEditTextInterface) editText).switchSoftKeyboardWithSystem();
94 | }
95 | });
96 | TextView changeTv = parent.findViewById(R.id.rl_switch_system_keyboard);
97 | frameLayout = parent.findViewById(R.id.keyboard_view);
98 | recognizer = new VoiceRecognizer(btnVoice, changeTv);
99 | }
100 |
101 | void hideKeyboardImme() {
102 | this.editText = null;
103 | if (recognizer != null) {
104 | recognizer.cancel();
105 | }
106 | if (dialog != null) {
107 | handler.removeMessages(1);
108 | handler.removeMessages(2);
109 | dialog.dismiss();
110 | }
111 | }
112 |
113 | boolean hideKeyboard() {
114 | this.editText = null;
115 | if (recognizer != null) {
116 | recognizer.cancel();
117 | }
118 | if (dialog != null && dialog.isShowing()) {
119 | handler.removeMessages(1);
120 | handler.sendEmptyMessageDelayed(2, 30);
121 | return true;
122 | } else {
123 | return false;
124 | }
125 | }
126 |
127 | void showVoiceView(boolean flag) {
128 | if (flag) {
129 | showAnimation();
130 | } else {
131 | hideAnimation();
132 | }
133 | }
134 |
135 | private void showAnimation() {
136 | hideAnimation();
137 | popupWindow = new PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
138 | View view = LayoutInflater.from(context).inflate(R.layout.dset_keyboard_animattion, new FrameLayout(context), false);
139 | popupWindow.setContentView(view);
140 | int navHeight = ViewUtils.getNavigationBarHeightIfRoom(editText.getContext());
141 | int height = keyboardView.getHeight() + voiceLayout.getHeight() + ViewUtils.dpToPx(context, 12) + navHeight;
142 | popupWindow.showAtLocation(editText, Gravity.BOTTOM, 0, height);
143 |
144 | animationView = view.findViewById(R.id.animation_view);
145 | if (!TextUtils.isEmpty(KeyboardManager.assetsFolder) && !TextUtils.isEmpty(KeyboardManager.animationName)) {
146 | animationView.setImageAssetsFolder(KeyboardManager.assetsFolder);
147 | animationView.setAnimation(KeyboardManager.animationName);
148 | animationView.playAnimation();
149 | }
150 | }
151 |
152 | private void hideAnimation() {
153 | if (animationView != null) {
154 | animationView.cancelAnimation();
155 | }
156 | if (popupWindow != null) {
157 | popupWindow.dismiss();
158 | popupWindow = null;
159 | }
160 | }
161 |
162 | void showKeyboard(EditText editText, int type, boolean voice, boolean isMask) {
163 | this.editText = editText;
164 | if (recognizer != null) {
165 | recognizer.setEditText(editText);
166 | }
167 | if (voice) {
168 | voiceLayout.setVisibility(View.VISIBLE);
169 | } else {
170 | voiceLayout.setVisibility(View.GONE);
171 | }
172 | setKeyboardView(type);
173 | if (dialog != null) {
174 | Window window = dialog.getWindow();
175 | if (isMask && window != null) {
176 | window.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
177 | }
178 | handler.removeMessages(2);
179 | handler.sendEmptyMessageDelayed(1, 30);
180 | }
181 | }
182 |
183 | private void setKeyboardView(int type) {
184 | EditText editText = getFocus();
185 | if (!(editText instanceof SecurityEditTextInterface)) {
186 | return;
187 | }
188 |
189 | if (keyboardView == null) {
190 | LayoutInflater inflater = LayoutInflater.from(context);
191 | keyboardView = (SecretKeyboardView) inflater.inflate(R.layout.dset_keyboard, frameLayout, false);
192 | keyboardView.setOnKeyboardActionListener(new KeyboardListener(keyboardView, this));
193 | frameLayout.addView(keyboardView);
194 | keyboardView.setPreviewEnabled(false);
195 | }
196 | keyboardView.setHideEnable(((SecurityEditTextInterface) editText).isHideEnable());
197 |
198 | android.inputmethodservice.Keyboard keyboard;
199 | switch (type) {
200 | case KEYBOARD_ID:
201 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_id);
202 | break;
203 | case KEYBOARD_NUM:
204 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_num);
205 | if (KeyboardManager.needRandom) {
206 | randomNumKey(keyboard.getKeys());
207 | }
208 | break;
209 | case KEYBOARD_NUM_ONLY:
210 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_num_only);
211 | if (KeyboardManager.needRandom) {
212 | randomNumOnlyKey(keyboard.getKeys());
213 | }
214 | break;
215 | case KEYBOARD_STOCK_NUM:
216 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_stock_number);
217 | break;
218 | case KEYBOARD_STOCK_LETTER:
219 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_stock_letter);
220 | break;
221 | default:
222 | keyboard = new android.inputmethodservice.Keyboard(context, R.xml.dset_keyboard_abc);
223 | if (KeyboardManager.needRandom) {
224 | randomTypicalKey(keyboard.getKeys());
225 | }
226 | break;
227 | }
228 | keyboardView.setKeyboard(keyboard);
229 | }
230 |
231 | /**
232 | * 随机数字键盘
233 | */
234 | private void randomNumKey(List keyList) {
235 | int size = keyList.size();
236 |
237 | for (int i = 0; i < size; i++) {
238 |
239 | int random_a = (int) (Math.random() * (size));
240 | int random_b = (int) (Math.random() * (size));
241 |
242 | if ((NUM_INDEX.contains(random_a))
243 | && (NUM_INDEX.contains(random_b))) {
244 | //得到随机数a的 字符编码
245 | int code = keyList.get(random_a).codes[0];
246 | //得到随机数a的 字符
247 | CharSequence label = keyList.get(random_a).label;
248 |
249 | keyList.get(random_a).codes[0] = keyList.get(random_b).codes[0];
250 | keyList.get(random_a).label = keyList.get(random_b).label;
251 |
252 | keyList.get(random_b).codes[0] = code;
253 | keyList.get(random_b).label = label;
254 | }
255 | }
256 | }
257 |
258 | private static final List NUM_INDEX = Arrays.asList(0, 1, 2, 4, 5, 6, 8, 9, 10, 11);
259 |
260 | /**
261 | * 随机数字键盘
262 | */
263 | private void randomNumOnlyKey(List keyList) {
264 | int size = keyList.size();
265 |
266 | for (int i = 0; i < size; i++) {
267 |
268 | int random_a = (int) (Math.random() * (size));
269 | int random_b = (int) (Math.random() * (size));
270 |
271 | if ((NUM_INDEX.contains(random_a))
272 | && (NUM_INDEX.contains(random_b))) {
273 | int code = keyList.get(random_a).codes[0];
274 | CharSequence label = keyList.get(random_a).label;
275 |
276 | keyList.get(random_a).codes[0] = keyList.get(random_b).codes[0];
277 | keyList.get(random_a).label = keyList.get(random_b).label;
278 |
279 | keyList.get(random_b).codes[0] = code;
280 | keyList.get(random_b).label = label;
281 | }
282 | }
283 | }
284 |
285 | private static final List NONE_TYPICAL_INDEX = Arrays.asList(19, 27, 28, 29, 30);
286 |
287 | /**
288 | * 随机全键盘
289 | */
290 | private void randomTypicalKey(List keyList) {
291 | int size = keyList.size();
292 |
293 | for (int i = 0; i < size; i++) {
294 |
295 | int random_a = (int) (Math.random() * (size));
296 | int random_b = (int) (Math.random() * (size));
297 |
298 | if ((!NONE_TYPICAL_INDEX.contains(random_a)) && (!NONE_TYPICAL_INDEX.contains(random_b))) {
299 | int code = keyList.get(random_a).codes[0];
300 | CharSequence label = keyList.get(random_a).label;
301 |
302 | keyList.get(random_a).codes[0] = keyList.get(random_b).codes[0];
303 | keyList.get(random_a).label = keyList.get(random_b).label;
304 |
305 | keyList.get(random_b).codes[0] = code;
306 | keyList.get(random_b).label = label;
307 | }
308 | }
309 | }
310 | }
311 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/KeyboardDialog.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
4 |
5 | import android.app.Dialog;
6 | import android.content.Context;
7 | import android.view.Gravity;
8 | import android.view.View;
9 | import android.view.Window;
10 | import android.view.WindowManager;
11 |
12 | /**
13 | * Created by xiaomao on 2016/10/16.
14 | */
15 |
16 | class KeyboardDialog extends Dialog implements View.OnClickListener {
17 |
18 |
19 | public KeyboardDialog(Context context) {
20 | super(context);
21 | initialize();
22 | }
23 |
24 | public KeyboardDialog(Context context, int themeResId) {
25 | super(context, themeResId);
26 | initialize();
27 | }
28 |
29 | protected KeyboardDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
30 | super(context, cancelable, cancelListener);
31 | initialize();
32 | }
33 |
34 | private void initialize() {
35 | Window window = getWindow();
36 | if (window == null) return;
37 | window.getDecorView().setPadding(0, 0, 0, 0);
38 | window.setGravity(Gravity.BOTTOM);
39 | window.setWindowAnimations(R.style.dsetDialogWindowAnim); //设置窗口弹出动画
40 | WindowManager.LayoutParams lp = window.getAttributes();
41 | lp.width = WindowManager.LayoutParams.MATCH_PARENT;
42 | lp.flags = FLAG_NOT_FOCUSABLE;// | FLAG_ALT_FOCUSABLE_IM | FLAG_WATCH_OUTSIDE_TOUCH;// | FLAG_NOT_TOUCH_MODAL;
43 | //window.setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
44 | setCanceledOnTouchOutside(false);
45 | setContentView(R.layout.dset_keyboard_layout);
46 | findViewById(R.id.finish).setOnClickListener(this);
47 | }
48 |
49 | @Override
50 | public void onClick(View v) {
51 | dismiss();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/KeyboardListener.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.inputmethodservice.KeyboardView;
4 | import android.text.Editable;
5 | import android.widget.EditText;
6 |
7 | import com.dfzq.dset.view.SecretKeyboardView;
8 |
9 | import static android.inputmethodservice.Keyboard.KEYCODE_ALT;
10 | import static android.inputmethodservice.Keyboard.KEYCODE_DELETE;
11 | import static android.inputmethodservice.Keyboard.KEYCODE_DONE;
12 | import static android.inputmethodservice.Keyboard.KEYCODE_MODE_CHANGE;
13 | import static android.inputmethodservice.Keyboard.KEYCODE_SHIFT;
14 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_NUM;
15 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_NUM_ONLY;
16 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_STOCK_LETTER;
17 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_STOCK_NUM;
18 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_TYPICAL;
19 |
20 |
21 | /**
22 | * ProductName:DsetKeyboard
23 | * PackageName:com.xiaomao.keyboard_id.keyboard_id
24 | * Dage:2016/10/14
25 | * Author:Fredric
26 | * Coding is an art not science
27 | */
28 |
29 | class KeyboardListener implements KeyboardView.OnKeyboardActionListener {
30 | public static final int SPACE = 32; // 空格键
31 | private static final int KEYCODE_600 = -10;
32 | private static final int KEYCODE_601 = -11;
33 | private static final int KEYCODE_002 = -12;
34 | private static final int KEYCODE_300 = -13;
35 | private static final int KEYCODE_000 = -15;
36 | private static final int KEYCODE_SWITCH_SYSTEM = -16;
37 | private static final int KEYCODE_688 = -17;
38 |
39 | private SecretKeyboardView keyboardView;
40 | private final DsetKeyboard dsetKeyboard;
41 |
42 | public void setKeyboardView(SecretKeyboardView keyboardView) {
43 | this.keyboardView = keyboardView;
44 | }
45 |
46 | public KeyboardListener(SecretKeyboardView keyboardView, DsetKeyboard dsetKeyboard) {
47 | this.keyboardView = keyboardView;
48 | this.dsetKeyboard = dsetKeyboard;
49 | }
50 |
51 | @Override
52 | public void onPress(int primaryCode) {
53 |
54 | }
55 |
56 | @Override
57 | public void onRelease(int primaryCode) {
58 |
59 | }
60 |
61 | @Override
62 | public void onKey(int primaryCode, int[] keyCodes) {
63 | KeyboardManager keyboardManager = KeyboardManager.getInstance();
64 | EditText editText = dsetKeyboard.getFocus();
65 | if (!(editText instanceof SecurityEditTextInterface)) {
66 | return;
67 | }
68 | SecurityEditTextInterface securityEditTextInterface = (SecurityEditTextInterface) editText;
69 | Editable editable = editText.getText();
70 | int start = editText.getSelectionStart();
71 | int type = securityEditTextInterface.getType();
72 |
73 | switch (primaryCode) {
74 | case SPACE:
75 | break;
76 | case KEYCODE_SWITCH_SYSTEM:
77 | ((SecurityEditTextInterface) editText).switchSoftKeyboardWithSystem();
78 | break;
79 | case KEYCODE_600:
80 | case KEYCODE_601:
81 | case KEYCODE_300:
82 | case KEYCODE_000:
83 | case KEYCODE_002:
84 | case KEYCODE_688:// 解决多code 快速点击错误问题
85 | if (editable != null) {
86 | editable.insert(start, getKeyLabel(primaryCode));
87 | }
88 | break;
89 | case KEYCODE_DELETE: {
90 | if (editable != null && editable.length() > 0) {
91 | if (start > 0) {
92 | editable.delete(start - 1, start);
93 | }
94 | }
95 | }
96 | break;
97 | case KEYCODE_DONE:
98 | case KEYCODE_ALT: {
99 | if (((SecurityEditTextInterface) editText).isHideEnable()) {
100 | ((SecurityEditTextInterface) editText).hideSystemSoftKeyboard();
101 | ((SecurityEditTextInterface) editText).hideSoftKeyboard();
102 | }
103 | }
104 | break;
105 | case KEYCODE_SHIFT: {
106 | keyboardView.changeShift();
107 | }
108 | break;
109 |
110 | case KEYCODE_MODE_CHANGE: {
111 | if (type == KEYBOARD_STOCK_LETTER) {
112 | securityEditTextInterface.setType(KEYBOARD_STOCK_NUM);
113 | } else if (type == KEYBOARD_STOCK_NUM) {
114 | securityEditTextInterface.setType(KEYBOARD_STOCK_LETTER);
115 | } else if (type == KEYBOARD_NUM) {
116 | securityEditTextInterface.setType(KEYBOARD_TYPICAL);
117 | } else {
118 | securityEditTextInterface.setType(KEYBOARD_NUM);
119 | }
120 | KeyboardManager.getInstance().showSoftInput(editText);
121 | }
122 | break;
123 | default:
124 | if (editable != null) {
125 | StringBuilder str = new StringBuilder();
126 | boolean confuse = keyboardManager.isConfuse() && confusable(type);
127 | for (int pChar : keyCodes) {
128 | if (pChar == -1) {
129 | break;
130 | }
131 | if (confuse) {
132 | str.append((char) keyboardManager.confuse(pChar));
133 | } else {
134 | str.append((char) pChar);
135 | }
136 | }
137 | editable.insert(start, str.toString());
138 | }
139 | break;
140 | }
141 | }
142 |
143 | private boolean confusable(int type) {
144 | return type == KEYBOARD_NUM ||
145 | type == KEYBOARD_NUM_ONLY ||
146 | type == KEYBOARD_TYPICAL;
147 | }
148 |
149 | private CharSequence getKeyLabel(int keyCode) {
150 | switch (keyCode) {
151 | case KEYCODE_600:
152 | return "600";
153 | case KEYCODE_601:
154 | return "601";
155 | case KEYCODE_300:
156 | return "300";
157 | case KEYCODE_000:
158 | return "000";
159 | case KEYCODE_002:
160 | return "002";
161 | case KEYCODE_688:
162 | return "688";
163 | default:
164 | return "";
165 | }
166 | }
167 |
168 | @Override
169 | public void onText(CharSequence text) {
170 |
171 | }
172 |
173 | @Override
174 | public void swipeLeft() {
175 |
176 | }
177 |
178 | @Override
179 | public void swipeRight() {
180 |
181 | }
182 |
183 | @Override
184 | public void swipeDown() {
185 |
186 | }
187 |
188 | @Override
189 | public void swipeUp() {
190 |
191 | }
192 | }
193 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/KeyboardManager.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.ContextWrapper;
6 | import android.os.Looper;
7 | import android.util.SparseIntArray;
8 | import android.view.ViewGroup;
9 | import android.widget.EditText;
10 |
11 | import androidx.annotation.NonNull;
12 | import androidx.appcompat.app.AppCompatActivity;
13 | import androidx.lifecycle.DefaultLifecycleObserver;
14 | import androidx.lifecycle.LifecycleOwner;
15 |
16 | import com.dfzq.dset.provider.Recognizer;
17 |
18 | import java.lang.ref.WeakReference;
19 | import java.util.HashMap;
20 | import java.util.Map;
21 |
22 | import javax.inject.Provider;
23 |
24 | /**
25 | * ProductName:DsetKeyboard
26 | * PackageName:com.xiaomao.keyboard_id.keyboard_id
27 | * Dage:2016/10/14
28 | * Author:Fredric
29 | * Coding is an art not science
30 | */
31 |
32 | public class KeyboardManager {
33 | // 是否随机
34 | public static boolean needRandom = false;
35 | public static int logo = R.drawable.dset_keyboard_special_btn_bg;
36 | public static String assetsFolder = "";
37 | public static String animationName = "";
38 | private WeakReference keyboardWeakReference;
39 | private boolean confuse;
40 | private SparseIntArray keys = new SparseIntArray();
41 | private final Map dialogKeyboardMap = new HashMap<>();
42 | private Provider provider;
43 |
44 | private static final class KeyboardManagerHolder {
45 | static final KeyboardManager keyboardManager = new KeyboardManager();
46 | }
47 |
48 | public static KeyboardManager getInstance() {
49 | return KeyboardManagerHolder.keyboardManager;
50 | }
51 |
52 | public Provider getProvider() {
53 | return provider;
54 | }
55 |
56 | public void setProvider(Provider provider) {
57 | this.provider = provider;
58 | }
59 |
60 | public void clearKeys() {
61 | keys = new SparseIntArray();
62 | }
63 |
64 | public void setKeys(SparseIntArray keys) {
65 | this.keys = keys;
66 | }
67 |
68 | public boolean isConfuse() {
69 | return confuse;
70 | }
71 |
72 | public void setConfuse(boolean confuse) {
73 | this.confuse = confuse;
74 | }
75 |
76 | /**
77 | * Validate EditText state
78 | *
79 | * @param editText 输入框
80 | * @return 输入框是否获取焦点
81 | */
82 | private boolean validEditText(EditText editText) {
83 | if (!(editText instanceof SecurityEditTextInterface)) {
84 | return false;
85 | }
86 | return editText.isAttachedToWindow();
87 | }
88 |
89 | public void showVoiceLineView(EditText editText, boolean flag) {
90 | if (editText != null) {
91 | DsetKeyboard keyboard = getKeyboard(editText, false);
92 | if (keyboard == null) {
93 | return;
94 | }
95 | keyboard.showVoiceView(flag);
96 | }
97 | }
98 |
99 | public boolean showSoftInput(EditText editText) {
100 | if (Thread.currentThread() != Looper.getMainLooper().getThread()) {
101 | return false;
102 | }
103 | if (!validEditText(editText)) {
104 | return false;
105 | }
106 | SecurityEditTextInterface securityEditTextInterface = (SecurityEditTextInterface) editText;
107 | DsetKeyboard keyboard = getKeyboard(editText);
108 | if (keyboard == null) {
109 | return false;
110 | }
111 | keyboard.showKeyboard(editText, securityEditTextInterface.getType(), securityEditTextInterface.getVoice(), securityEditTextInterface.isMask());
112 | keyboardWeakReference = new WeakReference<>(keyboard);
113 | return true;
114 |
115 | }
116 |
117 | public void hideSoftInput() {
118 | DsetKeyboard keyboard = currentKeyboard();
119 | if (keyboard != null) {
120 | keyboard.hideKeyboard();
121 | }
122 | }
123 |
124 | boolean hideSoftInput(EditText editText) {
125 | DsetKeyboard keyboard = getKeyboard(editText, false);
126 | if (keyboard != null && keyboard.getFocus() == editText) {
127 | return keyboard.hideKeyboard();
128 | }
129 | return false;
130 | }
131 |
132 | private DsetKeyboard currentKeyboard() {
133 | if (keyboardWeakReference != null) {
134 | return keyboardWeakReference.get();
135 | } else {
136 | return null;
137 | }
138 | }
139 |
140 | int confuse(int code) {
141 | return keys.get(code, code);
142 | }
143 |
144 | private DsetKeyboard getKeyboard(EditText editText) {
145 | return getKeyboard(editText, true);
146 | }
147 |
148 | private DsetKeyboard getKeyboard(EditText editText, boolean autoBuild) {
149 | int frameId = ((SecurityEditTextInterface) editText).getKeyboardFrameId();
150 | DsetKeyboard keyboard = null;
151 | if (frameId > 0) {
152 | ViewGroup parent = editText.getRootView().findViewById(frameId);
153 | Object tag = parent.getTag(R.id.dset_keyboard_id);
154 | if (tag instanceof DsetKeyboard) {
155 | keyboard = (DsetKeyboard) tag;
156 | } else if (tag == null && autoBuild) {
157 | keyboard = new DsetKeyboard(parent);
158 | parent.setTag(R.id.dset_keyboard_id, keyboard);
159 | }
160 | } else {
161 | AppCompatActivity activity = getActivity(editText.getContext());
162 | if (activity != null) {
163 | keyboard = dialogKeyboardMap.get(activity);
164 | if (dialogKeyboardMap.get(activity) == null && autoBuild) {
165 | keyboard = new DsetKeyboard(activity);
166 | dialogKeyboardMap.put(activity, keyboard);
167 |
168 | activity.getLifecycle().addObserver(new DefaultLifecycleObserver() {
169 | @Override
170 | public void onDestroy(@NonNull LifecycleOwner owner) {
171 | DsetKeyboard keyboard = dialogKeyboardMap.remove(activity);
172 | if (keyboard != null) {
173 | keyboard.hideKeyboardImme();
174 | }
175 | }
176 | });
177 | }
178 | }
179 | }
180 | return keyboard;
181 | }
182 |
183 | private AppCompatActivity getActivity(Context context) {
184 | Context baseContext = context;
185 | while (baseContext instanceof ContextWrapper) {
186 | if (baseContext instanceof AppCompatActivity) {
187 | return (AppCompatActivity) baseContext;
188 | }
189 | baseContext = ((ContextWrapper) baseContext).getBaseContext();
190 | }
191 | return null;
192 | }
193 |
194 | }
195 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/SecurityAutoCompleteEditText.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.content.Context;
4 | import android.graphics.Rect;
5 | import android.util.AttributeSet;
6 | import android.view.KeyEvent;
7 | import android.view.View;
8 |
9 | import androidx.appcompat.widget.AppCompatAutoCompleteTextView;
10 |
11 | /**
12 | * Created by zhanglei on 2017/5/17.
13 | */
14 |
15 | public class SecurityAutoCompleteEditText extends AppCompatAutoCompleteTextView implements SecurityEditTextInterface {
16 | private SecurityEditTextDelegate delegate;
17 | private VoiceInputStateChangeListener voiceInputStateChangeListener;
18 |
19 | public SecurityAutoCompleteEditText(Context context) {
20 | super(context);
21 | }
22 |
23 | public SecurityAutoCompleteEditText(Context context, AttributeSet attrs) {
24 | super(context, attrs);
25 | init(context, attrs);
26 | }
27 |
28 | public SecurityAutoCompleteEditText(Context context, AttributeSet attrs, int defStyleAttr) {
29 | super(context, attrs, defStyleAttr);
30 | init(context, attrs);
31 | }
32 |
33 | public void setVoiceInputStateChangeListener(VoiceInputStateChangeListener voiceInputStateChangeListener) {
34 | this.voiceInputStateChangeListener = voiceInputStateChangeListener;
35 | }
36 |
37 | public int getType() {
38 | return delegate.getType();
39 | }
40 |
41 | public void setType(int type) {
42 | delegate.setType(type);
43 | }
44 |
45 | @Override
46 | public boolean getVoice() {
47 | return delegate.getVoice();
48 | }
49 |
50 | @Override
51 | public void setVoice(boolean voice) {
52 | delegate.setVoice(voice);
53 | }
54 |
55 | public int getKeyboardFrameId() {
56 | return delegate.getKeyboardFrameId();
57 | }
58 |
59 | public void setKeyboardFrameId(int keyboardFrameId) {
60 | delegate.setKeyboardFrameId(keyboardFrameId);
61 | }
62 |
63 | public void init(Context context, AttributeSet attrs) {
64 | delegate = new SecurityEditTextDelegate(this);
65 | delegate.init(context, attrs);
66 | }
67 |
68 | @Override
69 | public void init(Context context) {
70 | delegate = new SecurityEditTextDelegate(this);
71 | delegate.init(context);
72 | }
73 |
74 | @Override
75 | public boolean performClick() {
76 | delegate.performClick();
77 | return super.performClick();
78 | }
79 |
80 | @Override
81 | public void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
82 | super.onFocusChanged(focused, direction, previouslyFocusedRect);
83 | delegate.onFocusChanged(focused, direction, previouslyFocusedRect);
84 | }
85 |
86 | @Override
87 | public void onAttachedToWindow() {
88 | super.onAttachedToWindow();
89 | delegate.onAttachedToWindow();
90 | }
91 |
92 | @Override
93 | public void onDetachedFromWindow() {
94 | super.onDetachedFromWindow();
95 | delegate.onDetachedFromWindow();
96 | }
97 |
98 |
99 | @Override
100 | protected void onVisibilityChanged(View changedView, int visibility) {
101 | super.onVisibilityChanged(changedView, visibility);
102 | }
103 |
104 | @Override
105 | public void onWindowFocusChanged(boolean hasWindowFocus) {
106 | super.onWindowFocusChanged(hasWindowFocus);
107 | delegate.onWindowFocusChanged(hasWindowFocus);
108 | }
109 |
110 | @Override
111 | public boolean onKeyPreIme(int keyCode, KeyEvent event) {
112 | if (delegate.onKeyPreIme(keyCode, event)) {
113 | return true;
114 | }
115 | return super.onKeyPreIme(keyCode, event);
116 | }
117 |
118 | @Override
119 | public void onVoiceStateChanged(int state) {
120 | if (voiceInputStateChangeListener != null) {
121 | voiceInputStateChangeListener.onStateChanged(state);
122 | }
123 | }
124 |
125 | @Override
126 | public void onVoiceErrorState(int error) {
127 | if (voiceInputStateChangeListener != null) {
128 | voiceInputStateChangeListener.onErrorState(error);
129 | }
130 | }
131 |
132 | /**
133 | * 隐藏系统键盘
134 | */
135 | public void hideSystemSoftKeyboard() {
136 | delegate.hideSystemSoftKeyboard();
137 | }
138 |
139 | @Override
140 | public void showSystemSoftKeyboard() {
141 | delegate.showSystemSoftKeyboard();
142 | }
143 |
144 | @Override
145 | public boolean hideSoftKeyboard() {
146 | return delegate.hideSoftKeyboard();
147 | }
148 |
149 | @Override
150 | public boolean showSoftKeyboard() {
151 | return delegate.showSoftKeyboard();
152 | }
153 |
154 | @Override
155 | public boolean isHideEnable() {
156 | return delegate.isHideEnable();
157 | }
158 |
159 | @Override
160 | public boolean isHide() {
161 | return delegate.isHide();
162 | }
163 |
164 | @Override
165 | public void switchSoftKeyboardWithSystem() {
166 | delegate.switchSoftKeyboardWithSystem();
167 | }
168 |
169 | @Override
170 | public void setMask(boolean mask) {
171 | delegate.setMask(mask);
172 | }
173 |
174 | @Override
175 | public boolean isMask() {
176 | return delegate.isMask();
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/SecurityEditText.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.content.Context;
4 | import android.graphics.Rect;
5 | import android.util.AttributeSet;
6 | import android.view.KeyEvent;
7 | import android.view.View;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.appcompat.widget.AppCompatEditText;
11 |
12 |
13 | /**
14 | * ProductName:DsetKeyboard
15 | * PackageName:com.xiaomao.keyboard_id.keyboard_id
16 | * Dage:2016/10/14
17 | * Author:Fredric
18 | * Coding is an art not science
19 | */
20 |
21 | public class SecurityEditText extends AppCompatEditText implements SecurityEditTextInterface {
22 | private SecurityEditTextDelegate delegate;
23 | private VoiceInputStateChangeListener voiceInputStateChangeListener;
24 |
25 | public SecurityEditText(Context context) {
26 | super(context);
27 | init(context);
28 | }
29 |
30 | public SecurityEditText(Context context, AttributeSet attrs) {
31 | super(context, attrs);
32 | init(context, attrs);
33 | }
34 |
35 | public SecurityEditText(Context context, AttributeSet attrs, int defStyleAttr) {
36 | super(context, attrs, defStyleAttr);
37 | init(context, attrs);
38 | }
39 |
40 | public void setVoiceInputStateChangeListener(@NonNull VoiceInputStateChangeListener voiceInputStateChangeListener) {
41 | this.voiceInputStateChangeListener = voiceInputStateChangeListener;
42 | }
43 |
44 | public int getType() {
45 | return delegate.getType();
46 | }
47 |
48 | public void setType(int type) {
49 | delegate.setType(type);
50 | }
51 |
52 | @Override
53 | public boolean getVoice() {
54 | return delegate.getVoice();
55 | }
56 |
57 | @Override
58 | public void setVoice(boolean voice) {
59 | delegate.setVoice(voice);
60 | }
61 |
62 | public int getKeyboardFrameId() {
63 | return delegate.getKeyboardFrameId();
64 | }
65 |
66 | public void setKeyboardFrameId(int keyboardFrameId) {
67 | delegate.setKeyboardFrameId(keyboardFrameId);
68 | }
69 |
70 | public void init(Context context, AttributeSet attrs) {
71 | delegate = new SecurityEditTextDelegate(this);
72 | delegate.init(context, attrs);
73 | }
74 |
75 | @Override
76 | public void init(Context context) {
77 | delegate = new SecurityEditTextDelegate(this);
78 | delegate.init(context);
79 | }
80 |
81 | @Override
82 | public boolean performClick() {
83 | delegate.performClick();
84 | return super.performClick();
85 | }
86 |
87 | @Override
88 | public void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
89 | super.onFocusChanged(focused, direction, previouslyFocusedRect);
90 | delegate.onFocusChanged(focused, direction, previouslyFocusedRect);
91 | }
92 |
93 | @Override
94 | public void onAttachedToWindow() {
95 | super.onAttachedToWindow();
96 | delegate.onAttachedToWindow();
97 | }
98 |
99 | @Override
100 | public void onDetachedFromWindow() {
101 | super.onDetachedFromWindow();
102 | delegate.onDetachedFromWindow();
103 | }
104 |
105 |
106 | @Override
107 | protected void onVisibilityChanged(View changedView, int visibility) {
108 | super.onVisibilityChanged(changedView, visibility);
109 | }
110 |
111 | @Override
112 | public void onWindowFocusChanged(boolean hasWindowFocus) {
113 | super.onWindowFocusChanged(hasWindowFocus);
114 | delegate.onWindowFocusChanged(hasWindowFocus);
115 | }
116 |
117 | @Override
118 | public boolean onKeyPreIme(int keyCode, KeyEvent event) {
119 | if (delegate.onKeyPreIme(keyCode, event)) {
120 | return true;
121 | }
122 | return super.onKeyPreIme(keyCode, event);
123 | }
124 |
125 | @Override
126 | public void onVoiceStateChanged(int state) {
127 | if (voiceInputStateChangeListener != null) {
128 | voiceInputStateChangeListener.onStateChanged(state);
129 | }
130 | }
131 |
132 | @Override
133 | public void onVoiceErrorState(int error) {
134 | if (voiceInputStateChangeListener != null) {
135 | voiceInputStateChangeListener.onErrorState(error);
136 | }
137 | }
138 |
139 | @Override
140 | public boolean isHideEnable() {
141 | return delegate.isHideEnable();
142 | }
143 |
144 | /**
145 | * 隐藏系统键盘
146 | */
147 | public void hideSystemSoftKeyboard() {
148 | delegate.hideSystemSoftKeyboard();
149 | }
150 |
151 | /**
152 | * 弹出系统键盘
153 | */
154 | @Override
155 | public void showSystemSoftKeyboard() {
156 | delegate.showSystemSoftKeyboard();
157 | }
158 |
159 | @Override
160 | public boolean hideSoftKeyboard() {
161 | return delegate.hideSoftKeyboard();
162 | }
163 |
164 | @Override
165 | public boolean showSoftKeyboard() {
166 | return delegate.showSoftKeyboard();
167 | }
168 |
169 | @Override
170 | public boolean isHide() {
171 | return delegate.isHide();
172 | }
173 |
174 | @Override
175 | public void switchSoftKeyboardWithSystem() {
176 | delegate.switchSoftKeyboardWithSystem();
177 | }
178 |
179 | @Override
180 | public void setMask(boolean mask) {
181 | delegate.setMask(mask);
182 | }
183 |
184 | @Override
185 | public boolean isMask() {
186 | return delegate.isMask();
187 | }
188 | }
189 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/SecurityEditTextDelegate.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import static com.dfzq.dset.view.SecretKeyboardView.KEYBOARD_NUM;
4 |
5 | import android.content.Context;
6 | import android.content.res.TypedArray;
7 | import android.graphics.Rect;
8 | import android.util.AttributeSet;
9 | import android.view.KeyEvent;
10 | import android.view.inputmethod.InputMethodManager;
11 | import android.widget.EditText;
12 |
13 | /**
14 | * Created by meihu on 2017/6/27.
15 | */
16 |
17 | public class SecurityEditTextDelegate implements SecurityEditTextInterface {
18 |
19 | private boolean voice;
20 |
21 | private int type;
22 |
23 | private int keyboardFrameId;
24 |
25 | private final EditText editText;
26 |
27 | /**
28 | * 自定义键盘是否隐藏
29 | */
30 | private boolean isHide;
31 |
32 | private boolean safe;
33 |
34 | public SecurityEditTextDelegate(EditText editText) {
35 | this.editText = editText;
36 | }
37 |
38 | @Override
39 | public void init(Context context) {
40 | editText.setClickable(true);
41 | editText.setShowSoftInputOnFocus(false);
42 | }
43 |
44 | @Override
45 | public void init(Context context, AttributeSet attrs) {
46 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SecurityEditText);
47 | voice = a.getBoolean(R.styleable.SecurityEditText_keyboardVoice, false);
48 | type = a.getInt(R.styleable.SecurityEditText_inputType, KEYBOARD_NUM);
49 | keyboardFrameId = a.getInt(R.styleable.SecurityEditText_keyboardFrameId, 0);
50 | a.recycle();
51 | init(context);
52 | }
53 |
54 | @Override
55 | public int getKeyboardFrameId() {
56 | return keyboardFrameId;
57 | }
58 |
59 | @Override
60 | public void setKeyboardFrameId(int keyboardFrameId) {
61 | this.keyboardFrameId = keyboardFrameId;
62 | }
63 |
64 | @Override
65 | public boolean isHideEnable() {
66 | return keyboardFrameId == 0;
67 | }
68 |
69 | @Override
70 | public boolean isHide() {
71 | return isHide;
72 | }
73 |
74 | @Override
75 | public void switchSoftKeyboardWithSystem() {
76 | if (isHideEnable()) {
77 | if (isHide()) {
78 | hideSystemSoftKeyboard();
79 | showSoftKeyboard();
80 | } else {
81 | hideSoftKeyboard();
82 | showSystemSoftKeyboard();
83 | }
84 | }
85 | }
86 |
87 | @Override
88 | public void setMask(boolean mask) {
89 | this.safe = mask;
90 | }
91 |
92 | public boolean isMask() {
93 | return safe;
94 | }
95 |
96 | @Override
97 | public boolean getVoice() {
98 | return voice;
99 | }
100 |
101 | @Override
102 | public void setVoice(boolean voice) {
103 | this.voice = voice;
104 | }
105 |
106 | @Override
107 | public int getType() {
108 | return type;
109 | }
110 |
111 | @Override
112 | public void setType(int type) {
113 | this.type = type;
114 | }
115 |
116 | @Override
117 | public void hideSystemSoftKeyboard() {
118 | isHide = false;
119 | InputMethodManager imm = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
120 | imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
121 | editText.postDelayed(() -> {
122 | if (editText.isFocused() && !isHide) {
123 | imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
124 | }
125 | }, 1000);
126 | }
127 |
128 | @Override
129 | public void showSystemSoftKeyboard() {
130 | isHide = true;
131 | InputMethodManager imm = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
132 | imm.showSoftInput(editText, 1);
133 | }
134 |
135 | @Override
136 | public boolean hideSoftKeyboard() {
137 | isHide = true;
138 | return KeyboardManager.getInstance().hideSoftInput(editText);
139 | }
140 |
141 | @Override
142 | public boolean showSoftKeyboard() {
143 | isHide = false;
144 | return KeyboardManager.getInstance().showSoftInput(editText);
145 | }
146 |
147 | @Override
148 | public boolean performClick() {
149 | if (editText.isFocused()) {
150 | hideSystemSoftKeyboard();
151 | KeyboardManager.getInstance().showSoftInput(editText);
152 | }
153 | return false;
154 | }
155 |
156 | @Override
157 | public void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
158 | if (focused) {
159 | hideSystemSoftKeyboard();
160 | showSoftKeyboard();
161 | // KeyboardManager.getInstance().showSoftInput(editText);
162 | } else {
163 | hideSoftKeyboard();
164 | }
165 | }
166 |
167 | @Override
168 | public void onAttachedToWindow() {
169 | if (editText.isFocused()) {
170 | hideSystemSoftKeyboard();
171 | KeyboardManager.getInstance().showSoftInput(editText);
172 | }
173 | }
174 |
175 | @Override
176 | public void onDetachedFromWindow() {
177 | if (editText.isFocused()) {
178 | hideSoftKeyboard();
179 | }
180 | }
181 |
182 | @Override
183 | public void onWindowFocusChanged(boolean hasWindowFocus) {
184 | if (hasWindowFocus && editText.hasFocus()) {
185 | editText.post(() -> {
186 | hideSystemSoftKeyboard();
187 | KeyboardManager.getInstance().showSoftInput(editText);
188 | });
189 | }
190 | }
191 |
192 | @Override
193 | public boolean onKeyPreIme(int keyCode, KeyEvent event) {
194 | return keyCode == KeyEvent.KEYCODE_BACK && hideSoftKeyboard();
195 | }
196 |
197 | @Override
198 | public void onVoiceStateChanged(int state) {
199 |
200 | }
201 |
202 | @Override
203 | public void onVoiceErrorState(int error) {
204 |
205 | }
206 | }
207 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/SecurityEditTextInterface.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.content.Context;
4 | import android.graphics.Rect;
5 | import android.util.AttributeSet;
6 | import android.view.KeyEvent;
7 |
8 | /**
9 | * Created by zhanglei on 2017/5/17.
10 | */
11 |
12 | interface SecurityEditTextInterface {
13 | void init(Context context, AttributeSet attrs);
14 |
15 | void init(Context context);
16 |
17 | int getKeyboardFrameId();
18 |
19 | void setKeyboardFrameId(int keyboardFrameId);
20 |
21 | boolean getVoice();
22 |
23 | void setVoice(boolean voice);
24 |
25 | int getType();
26 |
27 | void setType(int type);
28 |
29 | void hideSystemSoftKeyboard();
30 |
31 | void showSystemSoftKeyboard();
32 |
33 | boolean hideSoftKeyboard();
34 |
35 | boolean showSoftKeyboard();
36 |
37 | boolean performClick();
38 |
39 | void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect);
40 |
41 | void onAttachedToWindow();
42 |
43 | void onDetachedFromWindow();
44 |
45 | void onWindowFocusChanged(boolean hasWindowFocus);
46 |
47 | boolean onKeyPreIme(int keyCode, KeyEvent event);
48 |
49 | /**
50 | * 语音输入状态发生变化
51 | *
52 | * @param state 语音输入状态
53 | * 0. idle
54 | * 1. 输入
55 | */
56 | void onVoiceStateChanged(int state);
57 |
58 | /**
59 | * 语音识别错误
60 | *
61 | * @param error 语音识别错误码
62 | */
63 | void onVoiceErrorState(int error);
64 |
65 | /**
66 | * 是否支持隐藏,FrameId不为0时不支持
67 | *
68 | * @return true enable
69 | */
70 | boolean isHideEnable();
71 |
72 | boolean isHide();
73 |
74 | void switchSoftKeyboardWithSystem();
75 |
76 | /**
77 | * 是否屏蔽录屏
78 | * @param mask
79 | */
80 | void setMask(boolean mask);
81 |
82 | boolean isMask();
83 | }
84 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/ViewUtils.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.ContextWrapper;
6 | import android.os.Build;
7 | import android.provider.Settings;
8 | import android.text.TextUtils;
9 | import android.view.View;
10 |
11 | /**
12 | * Created by wangtao on 2020/9/28.
13 | */
14 | public class ViewUtils {
15 |
16 | public static int dpToPx(Context context, float dp) {
17 | final float scale = context.getResources().getDisplayMetrics().density;
18 | return (int) (dp * scale + 0.5f);
19 | }
20 |
21 | /**
22 | * 获取虚拟按键的高度
23 | * 1. 全面屏下
24 | * 1.1 开启全面屏开关-返回0
25 | * 1.2 关闭全面屏开关-执行非全面屏下处理方式
26 | * 2. 非全面屏下
27 | * 2.1 没有虚拟键-返回0
28 | * 2.1 虚拟键隐藏-返回0
29 | * 2.2 虚拟键存在且未隐藏-返回虚拟键实际高度
30 | */
31 | public static int getNavigationBarHeightIfRoom(Context context) {
32 | if (navigationGestureEnabled(context)) {
33 | return 0;
34 | }
35 | Activity activity = getActivity(context);
36 | if (activity == null) {
37 | return 0;
38 | }
39 | return getCurrentNavigationBarHeight(activity);
40 | }
41 |
42 | /**
43 | * 全面屏(是否开启全面屏开关 0 关闭 1 开启)
44 | */
45 | public static boolean navigationGestureEnabled(Context context) {
46 | int val = Settings.Global.getInt(context.getContentResolver(), getDeviceInfo(), 0);
47 | return val != 0;
48 | }
49 |
50 | /**
51 | * 获取设备信息(目前支持几大主流的全面屏手机,亲测华为、小米、oppo、魅族、vivo都可以)
52 | */
53 | public static String getDeviceInfo() {
54 | String brand = Build.BRAND;
55 | if (TextUtils.isEmpty(brand)) return "navigationbar_is_min";
56 |
57 | if (brand.equalsIgnoreCase("HUAWEI")) {
58 | return "navigationbar_is_min";
59 | } else if (brand.equalsIgnoreCase("XIAOMI")) {
60 | return "force_fsg_nav_bar";
61 | } else if (brand.equalsIgnoreCase("VIVO")) {
62 | return "navigation_gesture_on";
63 | } else if (brand.equalsIgnoreCase("OPPO")) {
64 | return "navigation_gesture_on";
65 | } else {
66 | return "navigationbar_is_min";
67 | }
68 | }
69 |
70 | private static Activity getActivity(Context context) {
71 | Context baseContext = context;
72 | while (baseContext instanceof ContextWrapper) {
73 | if (baseContext instanceof Activity) {
74 | return (Activity) baseContext;
75 | }
76 | baseContext = ((ContextWrapper) baseContext).getBaseContext();
77 | }
78 | return null;
79 | }
80 |
81 | /**
82 | * 非全面屏下 虚拟键实际高度(隐藏后高度为0)
83 | */
84 | public static int getCurrentNavigationBarHeight(Activity activity) {
85 | if (isNavigationBarShown(activity)) {
86 | return getNavigationBarHeight(activity);
87 | } else {
88 | return 0;
89 | }
90 | }
91 |
92 | /**
93 | * 非全面屏下 虚拟按键是否打开
94 | */
95 | public static boolean isNavigationBarShown(Activity activity) {
96 | //虚拟键的view,为空或者不可见时是隐藏状态
97 | View view = activity.findViewById(android.R.id.navigationBarBackground);
98 | if (view == null) {
99 | return false;
100 | }
101 | int visible = view.getVisibility();
102 | return visible != View.GONE && visible != View.INVISIBLE;
103 | }
104 |
105 | /**
106 | * 非全面屏下 虚拟键高度(无论是否隐藏)
107 | */
108 | public static int getNavigationBarHeight(Context context) {
109 | int result = 0;
110 | int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
111 | if (resourceId > 0) {
112 | result = context.getResources().getDimensionPixelSize(resourceId);
113 | }
114 | return result;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/VoiceInputStateChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | /**
4 | * Created by djy on 2018/1/4.
5 | */
6 |
7 | public interface VoiceInputStateChangeListener {
8 | /**
9 | * 语音输入状态发生变化
10 | *
11 | * @param state 语音输入状态
12 | * 0. idle
13 | * 1. 输入
14 | */
15 | void onStateChanged(int state);
16 |
17 | /**
18 | * 语音识别错误
19 | *
20 | * @param error 语音识别错误码
21 | */
22 | void onErrorState(int error);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/VoiceRecognizer.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
2 |
3 | import android.Manifest;
4 | import android.annotation.SuppressLint;
5 | import android.content.pm.PackageManager;
6 | import android.text.TextUtils;
7 | import android.view.MotionEvent;
8 | import android.view.View;
9 | import android.widget.EditText;
10 | import android.widget.ImageView;
11 | import android.widget.LinearLayout;
12 | import android.widget.TextView;
13 |
14 | import androidx.core.content.ContextCompat;
15 |
16 | import com.dfzq.dset.provider.DefaultRecognizer;
17 | import com.dfzq.dset.provider.Recognizer;
18 | import com.dfzq.dset.provider.RecognizerListener;
19 |
20 | import javax.inject.Provider;
21 |
22 | /**
23 | * Created by djy on 2018/1/4.
24 | */
25 |
26 | public class VoiceRecognizer implements View.OnTouchListener, RecognizerListener {
27 |
28 | private EditText editText;
29 | private ImageView voiceImg;
30 | private String preText = "";
31 | private boolean stopFlag;
32 | private final Recognizer recognizer;
33 | private TextView tvTitle;
34 | private final TextView changeTv;
35 | private LinearLayout voiceBg;
36 |
37 | public VoiceRecognizer(View voiceLayout, TextView changeTv) {
38 | if (voiceLayout != null) {
39 | voiceImg = voiceLayout.findViewById(R.id.iv_voice);
40 | tvTitle = voiceLayout.findViewById(R.id.tv_title);
41 | voiceBg = voiceLayout.findViewById(R.id.btn_voice);
42 | voiceLayout.setOnTouchListener(this);
43 | }
44 | this.changeTv = changeTv;
45 | recognizer = getRecognizer();
46 | recognizer.setRecognizerListener(this);
47 | }
48 |
49 | private Recognizer getRecognizer() {
50 | Provider provider = KeyboardManager.getInstance().getProvider();
51 | if (provider == null) {
52 | return new DefaultRecognizer();
53 | }
54 | return provider.get();
55 | }
56 |
57 | public void setEditText(EditText editText) {
58 | this.editText = editText;
59 | }
60 |
61 | public void cancel() {
62 | stopSpeech();
63 | recognizer.cancel();
64 | }
65 |
66 | private void startVoice() {
67 | if (editText != null) {
68 | preText = editText.getText().toString();
69 | }
70 | recognizer.startVoice();
71 | }
72 |
73 | private void stopVoice() {
74 | recognizer.stopVoice();
75 | }
76 |
77 | @SuppressLint("ClickableViewAccessibility")
78 | @Override
79 | public boolean onTouch(View view, MotionEvent motionEvent) {
80 | int action = motionEvent.getAction();
81 | switch (action) {
82 | case MotionEvent.ACTION_DOWN:
83 | startSpeech();
84 | break;
85 | case MotionEvent.ACTION_UP:
86 | stopSpeech();
87 | break;
88 | case MotionEvent.ACTION_MOVE:
89 | if (motionEvent.getY() < -ViewUtils.dpToPx(view.getContext(), 100)) {
90 | stopSpeech();
91 | }
92 | break;
93 | }
94 | return true;
95 | }
96 |
97 | private void startSpeech() {
98 | if (ContextCompat.checkSelfPermission(editText.getContext(),
99 | Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
100 | recognizer.requestPermission();
101 | return;
102 | }
103 | if (voiceImg != null) {
104 | voiceImg.setBackgroundResource(R.drawable.dset_keyboard_voice_speech_on_white);
105 | }
106 | if (tvTitle != null) {
107 | tvTitle.setText(R.string.dset_voice_release_tips);
108 | tvTitle.setTextColor(ContextCompat.getColor(tvTitle.getContext(), R.color.dset_white));
109 | }
110 | if (voiceBg != null) {
111 | voiceBg.setBackgroundResource(R.drawable.corner_gray_bg);
112 | }
113 | if (editText != null) {
114 | ((SecurityEditTextInterface) editText).onVoiceStateChanged(1);
115 | }
116 | if (changeTv != null) {
117 | changeTv.setVisibility(View.GONE);
118 | }
119 | stopFlag = true;
120 | KeyboardManager.getInstance().showVoiceLineView(editText, true);
121 | startVoice();
122 | }
123 |
124 | private void stopSpeech() {
125 | if (tvTitle != null) {
126 | tvTitle.setText(R.string.dset_voice_tips);
127 | tvTitle.setTextColor(ContextCompat.getColor(tvTitle.getContext(), R.color.dset_text_black));
128 | }
129 | if (voiceImg != null) {
130 | voiceImg.setBackgroundResource(R.drawable.dset_keyboard_voice_speech_off_gray);
131 | }
132 | if (editText != null) {
133 | ((SecurityEditTextInterface) editText).onVoiceStateChanged(0);
134 | }
135 | if (voiceBg != null) {
136 | voiceBg.setBackgroundResource(R.drawable.corner_white_bg);
137 | }
138 | if (changeTv != null) {
139 | changeTv.setVisibility(View.VISIBLE);
140 | }
141 | stopFlag = false;
142 | KeyboardManager.getInstance().showVoiceLineView(editText, false);
143 | stopVoice();
144 | }
145 |
146 | @Override
147 | public void onSuccess(String result) {
148 | result = preText + result;
149 | if (!TextUtils.isEmpty(result) && editText != null) {
150 | editText.setText(result);
151 | editText.setSelection(editText.getText().length());
152 | }
153 | }
154 |
155 | @Override
156 | public void onFailure(String errorMsg, int errorCode) {
157 | ((SecurityEditTextInterface) editText).onVoiceErrorState(errorCode);
158 | }
159 |
160 | @Override
161 | public void onVolumeChange(int volume) {
162 | }
163 |
164 | @Override
165 | public void onExit() {
166 | if (stopFlag) {
167 | startVoice();
168 | }
169 | }
170 |
171 | @Override
172 | public void onNoPermission() {
173 | stopFlag = false;
174 | if (voiceImg != null) {
175 | voiceImg.setBackgroundResource(R.drawable.dset_keyboard_voice_speech_on_white);
176 | }
177 | KeyboardManager.getInstance().showVoiceLineView(editText, true);
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/provider/DefaultRecognizer.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.provider;
2 |
3 | public class DefaultRecognizer implements Recognizer {
4 |
5 | @Override
6 | public void requestPermission() {
7 |
8 | }
9 |
10 | @Override
11 | public void cancel() {
12 |
13 | }
14 |
15 | @Override
16 | public void startVoice() {
17 |
18 | }
19 |
20 | @Override
21 | public void stopVoice() {
22 |
23 | }
24 |
25 | @Override
26 | public void setRecognizerListener(RecognizerListener listener) {
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/provider/Recognizer.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.provider;
2 |
3 | public interface Recognizer {
4 | /**
5 | * 请求录音权限
6 | */
7 | void requestPermission();
8 |
9 | /**
10 | * 取消语音识别服务
11 | */
12 | void cancel();
13 |
14 | /**
15 | * 开启语音识别服务
16 | */
17 | void startVoice();
18 |
19 | /**
20 | * 停止语音识别服务
21 | */
22 | void stopVoice();
23 |
24 | /**
25 | * 设置语音识别监听
26 | * @param listener listener
27 | */
28 | void setRecognizerListener(RecognizerListener listener);
29 | }
30 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/provider/RecognizerListener.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.provider;
2 |
3 | public interface RecognizerListener {
4 | /**
5 | * 语音识别成功
6 | *
7 | * @param result 失败结果
8 | */
9 | void onSuccess(String result);
10 |
11 | /**
12 | * 语音识别失败
13 | *
14 | * @param errorMsg 错误
15 | * @param errorCode 错误码
16 | */
17 | void onFailure(String errorMsg, int errorCode);
18 |
19 | /**
20 | * 语音音量变化
21 | *
22 | * @param volume 音量
23 | */
24 | void onVolumeChange(int volume);
25 |
26 | /**
27 | * 语音识别结束
28 | */
29 | void onExit();
30 |
31 | /**
32 | * 无语音权限
33 | */
34 | void onNoPermission();
35 | }
36 |
--------------------------------------------------------------------------------
/library/src/main/java/com/dfzq/dset/view/SecretKeyboardView.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.Paint;
7 | import android.graphics.Rect;
8 | import android.graphics.drawable.Drawable;
9 | import android.inputmethodservice.Keyboard;
10 | import android.inputmethodservice.KeyboardView;
11 | import android.util.AttributeSet;
12 |
13 | import androidx.core.content.ContextCompat;
14 |
15 | import com.dfzq.dset.KeyboardManager;
16 | import com.dfzq.dset.R;
17 |
18 | import java.util.List;
19 |
20 | import static android.inputmethodservice.Keyboard.KEYCODE_DONE;
21 |
22 | /**
23 | * Created by wangtao on 16/8/29.
24 | */
25 | public class SecretKeyboardView extends KeyboardView {
26 | public static final int KEYBOARD_NUM = 0x01;
27 | public static final int KEYBOARD_ID = 0x02;
28 | public static final int KEYBOARD_NUM_ONLY = 0x03;
29 | public static final int KEYBOARD_TYPICAL = 0x04;
30 | public static final int KEYBOARD_STOCK_NUM = 0x05;
31 | public static final int KEYBOARD_STOCK_LETTER = 0x06;
32 |
33 | protected boolean isHideEnable = true;
34 |
35 | private final Paint paint = new Paint();
36 |
37 | public SecretKeyboardView(Context context, AttributeSet attrs) {
38 | super(context, attrs);
39 | init();
40 | }
41 |
42 | public SecretKeyboardView(Context context, AttributeSet attrs, int defStyleAttr) {
43 | super(context, attrs, defStyleAttr);
44 | init();
45 | }
46 |
47 | public void setHideEnable(boolean hideEnable) {
48 | isHideEnable = hideEnable;
49 | }
50 |
51 | protected int dip2px(int dip) {
52 | float scale = getResources().getDisplayMetrics().density;
53 | return (int) (dip * scale + 0.5f);
54 | }
55 |
56 | private void init() {
57 | paint.setTextAlign(Paint.Align.CENTER);
58 | paint.setColor(Color.parseColor("#333333"));
59 | paint.setAntiAlias(true);
60 | }
61 |
62 | @Override
63 | public void onDraw(Canvas canvas) {
64 | super.onDraw(canvas);
65 | if (getKeyboard() != null) {
66 | List keys = getKeyboard().getKeys();
67 | for (Keyboard.Key key : keys) {
68 | draw(key, canvas);
69 | }
70 | }
71 | }
72 |
73 | protected void draw(Keyboard.Key key, Canvas canvas) {
74 | int code = key.codes[0];
75 | if (!isHideEnable && code == KEYCODE_DONE) {
76 | key.icon = null;
77 | }
78 | // 特殊键位添加背景,同时重绘键位文字或icon
79 | if (code < 0 || code == 46) {
80 | drawKeyBackground(R.drawable.dset_btn_keyboard_special_bg, canvas, key);
81 | drawKeyText(canvas, key);
82 | drawKeyIcon(canvas, key);
83 | }
84 | // logo
85 | if (code == 32) {
86 | drawKeyBackground(KeyboardManager.logo, canvas, key);
87 | }
88 | }
89 |
90 | /**
91 | * 键位背景
92 | */
93 | protected void drawKeyBackground(int drawableId, Canvas canvas, Keyboard.Key key) {
94 | Drawable npd = ContextCompat.getDrawable(getContext(), drawableId);
95 | if (npd == null) return;
96 | int[] drawableState = key.getCurrentDrawableState();
97 | if (key.codes[0] != 0) {
98 | npd.setState(drawableState);
99 | }
100 | npd.setBounds(key.x, key.y, key.x + key.width, key.y
101 | + key.height);
102 | npd.draw(canvas);
103 | }
104 |
105 | /**
106 | * 键位文字
107 | */
108 | protected void drawKeyText(Canvas canvas, Keyboard.Key key) {
109 | if (key.label == null) return;
110 | Rect bounds = new Rect();
111 | if (key.codes[0] == -16) {
112 | paint.setTextSize(dip2px(18));
113 | } else {
114 | paint.setTextSize(dip2px(20));
115 | }
116 | paint.getTextBounds(key.label.toString(), 0, key.label.toString()
117 | .length(), bounds);
118 | canvas.drawText(key.label.toString(), key.x + (float) (key.width / 2),
119 | (float) (key.y + key.height / 2) + (float) bounds.height() / 2, paint);
120 | }
121 |
122 | /**
123 | * 键位icon
124 | */
125 | protected void drawKeyIcon(Canvas canvas, Keyboard.Key key) {
126 | if (key.icon == null) return;
127 | Rect bound = new Rect(key.x + (key.width - key.icon.getIntrinsicWidth()) / 2,
128 | key.y + (key.height - key.icon.getIntrinsicHeight()) / 2,
129 | key.x + (key.width - key.icon.getIntrinsicWidth()) / 2 + key.icon.getIntrinsicWidth(),
130 | key.y + (key.height - key.icon.getIntrinsicHeight()) / 2 + key.icon.getIntrinsicHeight());
131 | key.icon.setBounds(bound);
132 | key.icon.draw(canvas);
133 | }
134 |
135 |
136 | /**
137 | * 键盘大小写切换
138 | */
139 | public void changeShift() {
140 | boolean upperCased = getKeyboard().isShifted();
141 | getKeyboard().setShifted(!upperCased);
142 | Keyboard keyboard = getKeyboard();
143 | changeKey(upperCased, getKeyboard().getKeys());
144 | Keyboard.Key shiftedKey = keyboard.getKeys().get(keyboard.getShiftKeyIndex());
145 | if (shiftedKey != null) {
146 | if (isShifted()) {
147 | shiftedKey.icon = ContextCompat.getDrawable(getContext(), R.drawable.dset_ic_keyboard_capslock_up_32dp);
148 | } else {
149 | shiftedKey.icon = ContextCompat.getDrawable(getContext(), R.drawable.dset_ic_keyboard_capslock_lower_32dp);
150 | }
151 | }
152 | invalidateAllKeys();
153 | }
154 |
155 | /**
156 | * 键位code值的大小写切换
157 | */
158 | private void changeKey(boolean isUpper, List keyList) {
159 | if (isUpper) {// 大写切小写
160 | for (android.inputmethodservice.Keyboard.Key key : keyList) {
161 | if (key.label != null && isWord(key.label.toString())) {
162 | key.codes[0] = key.codes[0] + 32;
163 | }
164 | }
165 | } else {// 小写切大写
166 | for (android.inputmethodservice.Keyboard.Key key : keyList) {
167 | if (key.label != null && isWord(key.label.toString())) {
168 | key.codes[0] = key.codes[0] - 32;
169 | }
170 | }
171 | }
172 | }
173 |
174 | /**
175 | * 判断是否为字母
176 | */
177 | private boolean isWord(String str) {
178 | String wordStr = "abcdefghijklmnopqrstuvwxyz";
179 | return wordStr.contains(str.toLowerCase());
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/library/src/main/res/anim/pop_from_button_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/library/src/main/res/anim/pop_from_button_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable-xxhdpi/arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/library/src/main/res/drawable-xxhdpi/arrow_left.png
--------------------------------------------------------------------------------
/library/src/main/res/drawable-xxhdpi/dset_keyboard_btn_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/library/src/main/res/drawable-xxhdpi/dset_keyboard_btn_normal.9.png
--------------------------------------------------------------------------------
/library/src/main/res/drawable-xxhdpi/dset_keyboard_btn_press.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/library/src/main/res/drawable-xxhdpi/dset_keyboard_btn_press.9.png
--------------------------------------------------------------------------------
/library/src/main/res/drawable-xxhdpi/dset_keyboard_voice_speech_off_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/library/src/main/res/drawable-xxhdpi/dset_keyboard_voice_speech_off_gray.png
--------------------------------------------------------------------------------
/library/src/main/res/drawable-xxhdpi/dset_keyboard_voice_speech_on_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orientsec/SecurityKeyboard/b76cee6d89a374eff4f6cd5c42902cefe1a21bd9/library/src/main/res/drawable-xxhdpi/dset_keyboard_voice_speech_on_white.png
--------------------------------------------------------------------------------
/library/src/main/res/drawable/btn_selector_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/corner_gray_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/corner_white_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_bg_keyboardview.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_btn_keyboard_special_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_btn_keyboard_special_normal_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_btn_keyboard_special_press_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_ic_keyboard_backspace_black_32dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_ic_keyboard_capslock_lower_32dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_ic_keyboard_capslock_up_32dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_ic_keyboard_hide_black_32dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_keyboard_bolder_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/dset_keyboard_special_btn_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/dset_keyboard.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/dset_keyboard_animattion.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
27 |
28 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/dset_keyboard_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
16 |
17 |
23 |
24 |
30 |
31 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/dset_keyboard_voice.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
30 |
31 |
39 |
40 |
46 |
47 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/library/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/library/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #e5e5e5
4 | #e5e5e5
5 | #1F1F1F
6 | #7F7F7F
7 |
--------------------------------------------------------------------------------
/library/src/main/res/values/keys.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 123
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 完成
3 | 普通键盘
4 | 中文
5 | 按住说话
6 | 松手完成
7 | 手指上滑,取消搜索
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_abc.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
16 |
19 |
22 |
25 |
28 |
31 |
34 |
37 |
41 |
42 |
43 |
48 |
51 |
54 |
57 |
60 |
63 |
66 |
69 |
73 |
74 |
75 |
82 |
86 |
89 |
92 |
95 |
98 |
101 |
104 |
111 |
112 |
113 |
117 |
120 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_id.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
16 |
20 |
26 |
27 |
28 |
32 |
35 |
38 |
42 |
43 |
44 |
45 |
48 |
51 |
52 |
55 |
58 |
59 |
60 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_num.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
16 |
19 |
25 |
26 |
27 |
31 |
34 |
37 |
41 |
42 |
43 |
44 |
47 |
50 |
51 |
54 |
57 |
58 |
59 |
62 |
65 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_num_only.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
16 |
19 |
25 |
26 |
27 |
31 |
34 |
37 |
38 |
39 |
40 |
43 |
46 |
47 |
50 |
53 |
54 |
55 |
58 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_stock_letter.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
16 |
19 |
22 |
25 |
28 |
31 |
34 |
37 |
41 |
42 |
43 |
48 |
51 |
54 |
57 |
60 |
63 |
66 |
69 |
73 |
74 |
75 |
82 |
86 |
89 |
92 |
95 |
98 |
101 |
104 |
111 |
112 |
113 |
117 |
121 |
124 |
128 |
132 |
133 |
--------------------------------------------------------------------------------
/library/src/main/res/xml/dset_keyboard_stock_number.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
15 |
18 |
21 |
25 |
26 |
27 |
30 |
33 |
36 |
39 |
42 |
43 |
44 |
47 |
50 |
53 |
56 |
59 |
60 |
61 |
64 |
67 |
70 |
73 |
76 |
77 |
--------------------------------------------------------------------------------
/library/src/test/java/com/dfzq/dset/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.dfzq.dset;
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 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':library'
2 |
--------------------------------------------------------------------------------