diff --git a/.gitignore b/.gitignore index c6cbe56..3c117df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,65 @@ +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ *.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/caches + +# Keystore files +# Uncomment the following line if you do not want to check your keystore files in. +#*.jks + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7940f80..dd59338 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ + android:theme="@style/AppTheme" + tools:ignore="GoogleAppIndexingWarning"> @@ -15,9 +17,8 @@ - - - + + \ No newline at end of file diff --git a/app/src/main/java/com/example/keybord/keyborddemo/MainActivity.java b/app/src/main/java/com/example/keybord/keyborddemo/MainActivity.java index a2abf9d..5c75d55 100644 --- a/app/src/main/java/com/example/keybord/keyborddemo/MainActivity.java +++ b/app/src/main/java/com/example/keybord/keyborddemo/MainActivity.java @@ -24,7 +24,7 @@ protected void onListItemClick(ListView l, View v, int position, long id) { startActivity(SystemKeyboardActivity.class); break; case 1: - startActivity(SystemKeyboardEidtTextActivity.class); + startActivity(SystemKeyboardEditTextActivity.class); break; } } diff --git a/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardActivity.java b/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardActivity.java index 3938778..ac555e2 100644 --- a/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardActivity.java +++ b/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardActivity.java @@ -13,8 +13,8 @@ import android.widget.Toast; import com.jay.easykeyboard.SystemKeyboard; -import com.jay.easykeyboard.action.IKeyBoardUI; -import com.jay.easykeyboard.action.KeyBoardActionListence; +import com.jay.easykeyboard.action.IKeyBoardUIChange; +import com.jay.easykeyboard.action.KeyBoardActionListener; import com.jay.easykeyboard.util.Util; /** @@ -34,11 +34,11 @@ public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_systemkeyboard); mKeyboard = findViewById(R.id.systemkeyboard); - Button btn_setkeyui = findViewById(R.id.btn_setkeyui); + Button btnChangeUi = findViewById(R.id.btn_change_ui); EditText edit1 = findViewById(R.id.edit); EditText edit2 = findViewById(R.id.edit2); mKeyboard.setEditText(edit1); //用于绑定EditText,如果切换了EditText,请务必设置此方法 - mKeyboard.setOnKeyboardActionListener(new KeyBoardActionListence() { + mKeyboard.setOnKeyboardActionListener(new KeyBoardActionListener() { @Override public void onComplete() { showShortToast("完成"); @@ -63,11 +63,11 @@ public void onClearAll() { edit1.setOnFocusChangeListener(this); edit2.setOnFocusChangeListener(this); - btn_setkeyui.setOnClickListener(new View.OnClickListener() { + btnChangeUi.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //改变ui - mKeyboard.setKeyboardUI(new IKeyBoardUI() { + mKeyboard.setKeyboardUI(new IKeyBoardUIChange() { @Override public Paint setPaint(Paint paint) { paint.setColor(Color.BLUE); @@ -82,7 +82,7 @@ public Paint setPaint(Paint paint) { @Override public void onClick(View v) { isRandom = !isRandom; - mKeyboard.setRandomkeys(isRandom); + mKeyboard.setRandomKeys(isRandom); } }); } diff --git a/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEidtTextActivity.java b/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEditTextActivity.java similarity index 74% rename from app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEidtTextActivity.java rename to app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEditTextActivity.java index 1aac851..a04e44b 100644 --- a/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEidtTextActivity.java +++ b/app/src/main/java/com/example/keybord/keyborddemo/SystemKeyboardEditTextActivity.java @@ -1,17 +1,12 @@ package com.example.keybord.keyborddemo; -import android.inputmethodservice.Keyboard; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.text.Editable; -import android.view.View; -import android.widget.EditText; -import android.widget.Toast; import com.jay.easykeyboard.SystemKeyBoardEditText; -import com.jay.easykeyboard.action.KeyBoardActionListence; -import com.jay.easykeyboard.impl.SystemOnKeyboardActionListener; +import com.jay.easykeyboard.action.KeyBoardActionListener; /** * Created by huangjie on 2018/2/6. @@ -19,7 +14,7 @@ * 说明:附带EditText的popwindow形式弹出的键盘 */ -public class SystemKeyboardEidtTextActivity extends AppCompatActivity implements KeyBoardActionListence { +public class SystemKeyboardEditTextActivity extends AppCompatActivity implements KeyBoardActionListener { @Override public void onCreate(@Nullable Bundle savedInstanceState) { diff --git a/app/src/main/res/layout/activity_systemkeyboard.xml b/app/src/main/res/layout/activity_systemkeyboard.xml index ea2b63c..06a8909 100644 --- a/app/src/main/res/layout/activity_systemkeyboard.xml +++ b/app/src/main/res/layout/activity_systemkeyboard.xml @@ -25,7 +25,7 @@