mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-17 03:01:24 +02:00
Add custom extra keys preference
This is a new section in the extra keys option that allows to enter arbitrary strings which are then added to the keyboard. A new string is needed for the title of the section, Android's icons and strings are used as much as possible to avoid adding more strings. Keys are stored in the preferences as a JSON array of strings.
This commit is contained in:
4
res/layout/custom_extra_key_add.xml
Normal file
4
res/layout/custom_extra_key_add.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center">
|
||||
<View android:layout_width="@dimen/pref_button_size" android:layout_height="@dimen/pref_button_size" android:background="@android:drawable/ic_menu_add"/>
|
||||
</LinearLayout>
|
4
res/layout/custom_extra_key_add_dialog.xml
Normal file
4
res/layout/custom_extra_key_add_dialog.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content">
|
||||
<EditText android:id="@+id/key_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp"/>
|
||||
</LinearLayout>
|
4
res/layout/custom_extra_key_widget.xml
Normal file
4
res/layout/custom_extra_key_widget.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal">
|
||||
<Button android:id="@+id/btn_custom_extra_key_remove" android:layout_width="@dimen/pref_button_size" android:layout_height="@dimen/pref_button_size" android:layout_gravity="center" android:background="@android:drawable/ic_menu_close_clear_cancel"/>
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user