mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
First commit to add Magikeyboard
This commit is contained in:
@@ -114,4 +114,5 @@ dependencies {
|
|||||||
// Icon pack, classic for all, material for libre and pro
|
// Icon pack, classic for all, material for libre and pro
|
||||||
implementation project(path: ':icon-pack-classic')
|
implementation project(path: ':icon-pack-classic')
|
||||||
implementation project(path: ':icon-pack-material')
|
implementation project(path: ':icon-pack-material')
|
||||||
|
implementation project(path: ':magikeyboard')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import android.support.v7.preference.PreferenceCategory;
|
|||||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.autofill.AutofillManager;
|
import android.view.autofill.AutofillManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.kunzisoft.keepass.BuildConfig;
|
import com.kunzisoft.keepass.BuildConfig;
|
||||||
@@ -60,6 +61,8 @@ import com.kunzisoft.keepass.settings.preferenceDialogFragment.ParallelismPrefer
|
|||||||
import com.kunzisoft.keepass.settings.preferenceDialogFragment.RoundsPreferenceDialogFragmentCompat;
|
import com.kunzisoft.keepass.settings.preferenceDialogFragment.RoundsPreferenceDialogFragmentCompat;
|
||||||
import com.kunzisoft.keepass.stylish.Stylish;
|
import com.kunzisoft.keepass.stylish.Stylish;
|
||||||
|
|
||||||
|
import static android.content.Context.INPUT_METHOD_SERVICE;
|
||||||
|
|
||||||
public class NestedSettingsFragment extends PreferenceFragmentCompat
|
public class NestedSettingsFragment extends PreferenceFragmentCompat
|
||||||
implements Preference.OnPreferenceClickListener {
|
implements Preference.OnPreferenceClickListener {
|
||||||
|
|
||||||
@@ -277,8 +280,16 @@ public class NestedSettingsFragment extends PreferenceFragmentCompat
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO define the checkbox by verifying
|
||||||
SwitchPreference keyboardPreference = (SwitchPreference) findPreference(getString(R.string.magic_keyboard_key));
|
SwitchPreference keyboardPreference = (SwitchPreference) findPreference(getString(R.string.magic_keyboard_key));
|
||||||
preferenceInDevelopment(keyboardPreference);
|
keyboardPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
if (getContext() != null) {
|
||||||
|
InputMethodManager imeManager = (InputMethodManager) getContext().getSystemService(INPUT_METHOD_SERVICE);
|
||||||
|
if (imeManager != null)
|
||||||
|
imeManager.showInputMethodPicker();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
1
magikeyboard/.gitignore
vendored
Normal file
1
magikeyboard/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
28
magikeyboard/build.gradle
Normal file
28
magikeyboard/build.gradle
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 27
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 14
|
||||||
|
targetSdkVersion 27
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||||
|
}
|
||||||
21
magikeyboard/proguard-rules.pro
vendored
Normal file
21
magikeyboard/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
20
magikeyboard/src/main/AndroidManifest.xml
Normal file
20
magikeyboard/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.kunzisoft.magikeyboard" >
|
||||||
|
<application>
|
||||||
|
<service
|
||||||
|
android:name="com.kunzisoft.magikeyboard.MagikIME"
|
||||||
|
android:permission="android.permission.BIND_INPUT_METHOD" >
|
||||||
|
<meta-data android:name="android.view.im"
|
||||||
|
android:resource="@xml/method"/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.view.InputMethod" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
<activity android:name="com.kunzisoft.magikeyboard.MagikIMESettings"
|
||||||
|
android:label="@string/keyboard_name">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
*
|
||||||
|
* This file is part of KeePass DX.
|
||||||
|
*
|
||||||
|
* KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.kunzisoft.magikeyboard;
|
||||||
|
|
||||||
|
import android.inputmethodservice.InputMethodService;
|
||||||
|
import android.inputmethodservice.Keyboard;
|
||||||
|
import android.inputmethodservice.KeyboardView;
|
||||||
|
import android.view.KeyEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.inputmethod.InputConnection;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
|
||||||
|
public class MagikIME extends InputMethodService
|
||||||
|
implements KeyboardView.OnKeyboardActionListener {
|
||||||
|
private static final String TAG = MagikIME.class.getName();
|
||||||
|
|
||||||
|
private static final int KEY_CHANGE_KEYBOARD = 600;
|
||||||
|
private static final int KEY_LOCK = 610;
|
||||||
|
private static final int KEY_ENTRY = 620;
|
||||||
|
private static final int KEY_USERNAME = 500;
|
||||||
|
private static final int KEY_PASSWORD = 510;
|
||||||
|
private static final int KEY_URL = 520;
|
||||||
|
private static final int KEY_FIELDS = 530;
|
||||||
|
|
||||||
|
private KeyboardView keyboardView;
|
||||||
|
private Keyboard keyboard;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateInputView() {
|
||||||
|
keyboardView = (KeyboardView) getLayoutInflater().inflate(R.layout.keyboard, null);
|
||||||
|
keyboard = new Keyboard(this, R.xml.password_keys);
|
||||||
|
keyboardView.setKeyboard(keyboard);
|
||||||
|
keyboardView.setOnKeyboardActionListener(this);
|
||||||
|
keyboardView.setPreviewEnabled(false);
|
||||||
|
return keyboardView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onKey(int primaryCode, int[] keyCodes) {
|
||||||
|
InputConnection ic = getCurrentInputConnection();
|
||||||
|
switch(primaryCode){
|
||||||
|
case KEY_CHANGE_KEYBOARD:
|
||||||
|
InputMethodManager imeManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||||
|
if (imeManager != null)
|
||||||
|
imeManager.showInputMethodPicker();
|
||||||
|
break;
|
||||||
|
case KEY_LOCK:
|
||||||
|
break;
|
||||||
|
case KEY_ENTRY:
|
||||||
|
break;
|
||||||
|
case KEY_USERNAME:
|
||||||
|
break;
|
||||||
|
case KEY_PASSWORD:
|
||||||
|
break;
|
||||||
|
case KEY_URL:
|
||||||
|
break;
|
||||||
|
case KEY_FIELDS:
|
||||||
|
break;
|
||||||
|
case Keyboard.KEYCODE_DELETE :
|
||||||
|
ic.deleteSurroundingText(1, 0);
|
||||||
|
break;
|
||||||
|
case Keyboard.KEYCODE_DONE:
|
||||||
|
ic.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPress(int primaryCode) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRelease(int primaryCode) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onText(CharSequence text) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void swipeDown() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void swipeLeft() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void swipeRight() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void swipeUp() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
*
|
||||||
|
* This file is part of KeePass DX.
|
||||||
|
*
|
||||||
|
* KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.kunzisoft.magikeyboard;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceActivity;
|
||||||
|
import android.preference.PreferenceFragment;
|
||||||
|
|
||||||
|
public class MagikIMESettings extends PreferenceActivity {
|
||||||
|
@Override
|
||||||
|
public Intent getIntent() {
|
||||||
|
final Intent modIntent = new Intent(super.getIntent());
|
||||||
|
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, Settings.class.getName());
|
||||||
|
modIntent.putExtra(EXTRA_NO_HEADERS, true);
|
||||||
|
return modIntent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// We overwrite the title of the activity, as the default one is "Voice Search".
|
||||||
|
setTitle(R.string.keyboard_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isValidFragment(final String fragmentName) {
|
||||||
|
return Settings.class.getName().equals(fragmentName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Settings extends PreferenceFragment {
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// Load the preferences from an XML resource
|
||||||
|
addPreferencesFromResource(R.xml.ime_preferences);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:color="#FFFFFFFF"
|
||||||
|
tools:targetApi="lollipop">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<corners
|
||||||
|
android:radius="2dp" />
|
||||||
|
<padding
|
||||||
|
android:left="0dp"
|
||||||
|
android:right="0dp"
|
||||||
|
android:top="12dp"
|
||||||
|
android:bottom="12dp"/>
|
||||||
|
<stroke android:width="1dp" android:color="@color/keyboard_button_border" />
|
||||||
|
<solid android:color="@color/keyboard_button"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M22,3L7,3c-0.69,0 -1.23,0.35 -1.59,0.88L0,12l5.41,8.11c0.36,0.53 0.9,0.89 1.59,0.89h15c1.1,0 2,-0.9 2,-2L24,5c0,-1.1 -0.9,-2 -2,-2zM19,15.59L17.59,17 14,13.41 10.41,17 9,15.59 12.59,12 9,8.41 10.41,7 14,10.59 17.59,7 19,8.41 15.41,12 19,15.59z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFFFF" android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M19,7v4H5.83l3.58,-3.59L8,6l-6,6 6,6 1.41,-1.41L5.83,13H21V7z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M3,13h2v-2L3,11v2zM3,17h2v-2L3,15v2zM3,9h2L5,7L3,7v2zM7,13h14v-2L7,11v2zM7,17h14v-2L7,15v2zM7,7v2h14L21,7L7,7z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp">
|
||||||
|
<group
|
||||||
|
android:translateY="-8">
|
||||||
|
<group
|
||||||
|
android:scaleX="1.777778"
|
||||||
|
android:scaleY="1.777778"
|
||||||
|
android:translateX="-205.4844"
|
||||||
|
android:translateY="-31.99788">
|
||||||
|
<group
|
||||||
|
android:scaleX="0.9767252"
|
||||||
|
android:scaleY="1.023829">
|
||||||
|
<group
|
||||||
|
android:scaleX="0.5759041"
|
||||||
|
android:scaleY="0.5494079"
|
||||||
|
android:translateX="118.3393"
|
||||||
|
android:translateY="21.97515">
|
||||||
|
<path
|
||||||
|
android:pathData="M3.8789062 9l0 2.53125L1.5332031 10.193359 1 11.230469 3.3457031 12.503906 1 13.785156l0.5332031 1.03711 2.3457031 -1.353516 0 2.53125 1.1933594 0 0 -2.53125 2.3378906 1.353516 0.5351563 -1.03711 -2.3183594 -1.28125 2.3183594 -1.273437 -0.5351563 -1.03711 -2.3378906 1.337891 0 -2.53125 -1.1933594 0zm7.5273438 0l0 2.53125 -2.3457031 -1.337891 -0.5332031 1.03711 2.3457032 1.273437 -2.3457032 1.28125 0.5332031 1.03711 2.3457031 -1.353516 0 2.53125 1.193359 0 0 -2.53125 2.339844 1.353516 0.533203 -1.03711 -2.318359 -1.28125 2.318359 -1.273437 -0.533203 -1.03711 -2.339844 1.337891 0 -2.53125 -1.193359 0zm7.527344 0l0 2.53125 -2.34375 -1.337891 -0.535156 1.03711 2.345703 1.273437 -2.345703 1.28125 0.535156 1.03711 2.34375 -1.353516 0 2.53125 1.195312 0 0 -2.53125 2.337891 1.353516L23 13.785156 20.683594 12.503906 23 11.230469l-0.533203 -1.03711 -2.337891 1.337891 0 -2.53125 -1.195312 0z"
|
||||||
|
android:strokeLineCap="butt"
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:strokeLineJoin="miter" />
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||||
|
</vector>
|
||||||
31
magikeyboard/src/main/res/drawable/key_background.xml
Normal file
31
magikeyboard/src/main/res/drawable/key_background.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- Non focused states -->
|
||||||
|
<item
|
||||||
|
android:state_focused="false"
|
||||||
|
android:state_selected="false"
|
||||||
|
android:state_pressed="false"
|
||||||
|
android:drawable="@drawable/key_background_normal" />
|
||||||
|
<!-- Pressed state -->
|
||||||
|
<item
|
||||||
|
android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/key_background_pressed" />
|
||||||
|
</selector>
|
||||||
37
magikeyboard/src/main/res/drawable/key_background_normal.xml
Normal file
37
magikeyboard/src/main/res/drawable/key_background_normal.xml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:color="#FFFFFFFF"
|
||||||
|
tools:targetApi="lollipop">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<corners
|
||||||
|
android:radius="2dp" />
|
||||||
|
<padding
|
||||||
|
android:left="0dp"
|
||||||
|
android:right="0dp"
|
||||||
|
android:top="12dp"
|
||||||
|
android:bottom="12dp"/>
|
||||||
|
<stroke android:width="1dp" android:color="@color/keyboard_button_border" />
|
||||||
|
<solid android:color="@color/keyboard_button"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/keyboard_background"/>
|
||||||
|
</shape>
|
||||||
31
magikeyboard/src/main/res/layout/key_preview.xml
Normal file
31
magikeyboard/src/main/res/layout/key_preview.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:alpha="0.7"
|
||||||
|
android:background="#f1f1f1"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:textColor="#333">
|
||||||
|
|
||||||
|
</TextView>
|
||||||
32
magikeyboard/src/main/res/layout/keyboard.xml
Normal file
32
magikeyboard/src/main/res/layout/keyboard.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<android.inputmethodservice.KeyboardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/keyboard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:keyPreviewLayout ="@layout/key_preview"
|
||||||
|
android:background="@color/keyboard_background"
|
||||||
|
android:keyBackground="@drawable/key_background_normal"
|
||||||
|
android:keyTextColor="#ffff"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
/>
|
||||||
25
magikeyboard/src/main/res/values/colors.xml
Normal file
25
magikeyboard/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<color name="keyboard_button">#263238</color>
|
||||||
|
<!-- <color name="keyboard_button_border">#37474f</color> -->
|
||||||
|
<color name="keyboard_button_border">#263238</color>
|
||||||
|
<color name="keyboard_background">#263238</color>
|
||||||
|
</resources>
|
||||||
21
magikeyboard/src/main/res/values/strings.xml
Normal file
21
magikeyboard/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<string name="keyboard_name">Magikeyboard</string>
|
||||||
|
</resources>
|
||||||
22
magikeyboard/src/main/res/xml/ime_preferences.xml
Normal file
22
magikeyboard/src/main/res/xml/ime_preferences.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- TODO Preferences -->
|
||||||
|
</PreferenceScreen>
|
||||||
24
magikeyboard/src/main/res/xml/method.xml
Normal file
24
magikeyboard/src/main/res/xml/method.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<input-method
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<subtype
|
||||||
|
android:imeSubtypeMode="keyboard"/>
|
||||||
|
</input-method>
|
||||||
66
magikeyboard/src/main/res/xml/password_keys.xml
Normal file
66
magikeyboard/src/main/res/xml/password_keys.xml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<!--
|
||||||
|
Copyright 2018 Jeremy Jamet / Kunzisoft.
|
||||||
|
|
||||||
|
This file is part of KeePass DX.
|
||||||
|
|
||||||
|
KeePass DX is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
KeePass DX is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:keyWidth="25%p"
|
||||||
|
android:horizontalGap="2dp"
|
||||||
|
android:verticalGap="8dp"
|
||||||
|
android:keyHeight="38dp">
|
||||||
|
<Row>
|
||||||
|
<Key android:codes="520"
|
||||||
|
android:keyEdgeFlags="left"
|
||||||
|
android:keyIcon="@drawable/ic_link_black_24dp"
|
||||||
|
android:isRepeatable="false"/>
|
||||||
|
<Key android:codes="500"
|
||||||
|
android:keyIcon="@drawable/ic_person_white_24dp"
|
||||||
|
android:isRepeatable="false" />
|
||||||
|
<Key android:codes="510"
|
||||||
|
android:keyIcon="@drawable/ic_password_white_24dp"
|
||||||
|
android:isRepeatable="false"/>
|
||||||
|
<Key android:codes="530"
|
||||||
|
android:keyIcon="@drawable/ic_list_white_24dp"
|
||||||
|
android:isRepeatable="false"
|
||||||
|
android:keyEdgeFlags="right"/>
|
||||||
|
</Row>
|
||||||
|
<Row android:rowEdgeFlags="bottom">
|
||||||
|
<Key android:codes="600"
|
||||||
|
android:keyIcon="@drawable/ic_keyboard_white_24dp"
|
||||||
|
android:keyWidth="20%p"
|
||||||
|
android:horizontalGap="8dp"
|
||||||
|
android:keyEdgeFlags="left"
|
||||||
|
android:isRepeatable="false"/>
|
||||||
|
<Key android:codes="610"
|
||||||
|
android:keyIcon="@drawable/ic_lock_white_24dp"
|
||||||
|
android:keyWidth="18%p"
|
||||||
|
android:isRepeatable="false" />
|
||||||
|
<Key android:codes="620"
|
||||||
|
android:keyWidth="28%p"
|
||||||
|
android:keyIcon="@drawable/ic_keyboard_white_24dp"
|
||||||
|
android:horizontalGap="8dp"
|
||||||
|
android:isRepeatable="false"/>
|
||||||
|
<Key android:codes="-5"
|
||||||
|
android:keyIcon="@drawable/ic_backspace_white_24dp"
|
||||||
|
android:keyWidth="16%p"
|
||||||
|
android:isRepeatable="true"/>
|
||||||
|
<Key android:codes="-4"
|
||||||
|
android:keyIcon="@drawable/ic_keyboard_return_white_24dp"
|
||||||
|
android:keyWidth="18%p"
|
||||||
|
android:isRepeatable="false"
|
||||||
|
android:keyEdgeFlags="right"/>
|
||||||
|
</Row>
|
||||||
|
</Keyboard>
|
||||||
@@ -1 +1 @@
|
|||||||
include ':app', ':icon-pack-classic', ':icon-pack-material'
|
include ':app', ':icon-pack-classic', ':icon-pack-material', ':magikeyboard'
|
||||||
|
|||||||
Reference in New Issue
Block a user