1
0
Fork 0

Total engine refactoring (#44)

* totally refactored the Languages, the Database and the IME module. New and more clear folder/package structure

* CharMap and LangHelper are no more

* removed many unused icons, translations and other resources

* deleted the old keymap samples

* Update user-manual.md

* Preferences are stored in Preferences, not in the database.

* removed some unclear and unused settings from the Preferences screen and the code.

* fixed issues with displaying the UI

* removed all non-English words and words with foreign spelling from the English dictionary

* 0 now works as it should in all modes.

* a more clear newline character in suggestions view

* last used input mode is now preserved and restored the next time

* removed the smiley and symbol dialogs

* capsMode -> textCase

* language names are no longer translated

* updated build instructions

* better use of threads for DB operations

* current text candidate is as long as the sequence, to make it more intuitive

* single characters are added to the end of the suggestion, when there are no more in the database

* Added ѝ to Bulgarian character map

* disabled adding words in a user-friendly manner

* when adding a new word is not possible, a toast message appears, for better user experience

* an error is logged when there are duplicate language IDs

* settings -> settings_legacy

* custom Logger class for easier debugging and no logcat flood in the Release version

* removed unnecessary single letters and invalid words from the dictionaries

* more translations cleanup; also corrected some weird translations

* upgraded gradle
This commit is contained in:
Dimo Karaivanov 2022-10-03 15:28:24 +03:00 committed by GitHub
parent af172b79c9
commit 78b6681812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
225 changed files with 2723 additions and 4986 deletions

View file

@ -25,7 +25,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:onClick="addWordButton"
android:text="@string/add_word" />
android:text="@string/add_word_add" />
<Button
android:id="@+id/add_word_cancel"

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:orientation="vertical"
android:padding="5dp" >
<TextView
android:id="@+id/left_hold_upper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginTop="0dp"
android:layout_marginBottom="2dp"
android:gravity="center_vertical"
android:padding="2dp"
android:paddingTop="4dp"
android:text="@string/main_left_insert"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/button_text"
android:textSize="15sp" />
<TextView
android:id="@+id/left_hold_lower"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:drawableLeft="@drawable/holdicon"
android:drawablePadding="3dp"
android:gravity="center_vertical"
android:padding="0dp"
android:text="@string/main_left_addword"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/button_text"
android:textSize="11sp" />
</LinearLayout>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:orientation="vertical"
android:padding="5dp" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginBottom="2dp"
android:layout_marginTop="0dp"
android:gravity="center_vertical"
android:padding="2dp"
android:paddingTop="5dp"
android:text="@string/main_left_insert"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/button_text"
android:textSize="15sp" />
</LinearLayout>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="58dp"
android:layout_height="48dp"
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:layout_marginRight="0dp"
@ -10,68 +10,52 @@
android:gravity="bottom"
android:orientation="horizontal">
<ViewSwitcher
<Button
android:id="@+id/main_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="1px"
android:layout_marginRight="1px"
android:layout_weight="5"
android:layout_weight="3"
android:background="@drawable/button_custom"
android:clickable="true"
android:focusable="false"
android:longClickable="true">
android:longClickable="true"
android:text="⚙"
android:textColor="@color/button_text"
android:textSize="24sp" />
<include
android:id="@+id/main_left_nohold"
layout="@layout/lbuttonnohold"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
android:id="@+id/main_left_hold"
layout="@layout/lbuttonhold"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</ViewSwitcher>
<Button
android:id="@+id/main_mid"
android:layout_width="0dp"
android:layout_height="58dp"
android:layout_marginLeft="1px"
android:layout_marginRight="1px"
android:layout_weight="2"
android:background="@drawable/button_custom"
android:focusable="false"
android:longClickable="true"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:text="@string/main_mid"
android:textColor="@color/button_text" />
<RelativeLayout
android:id="@+id/main_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="1px"
android:layout_marginTop="0dp"
android:layout_marginRight="1px"
android:layout_weight="5"
android:background="@drawable/button_custom"
android:clickable="true"
android:focusable="false"
android:longClickable="true"
android:paddingLeft="2dp"
android:paddingTop="1dp">
android:paddingRight="2dp"
android:text="@string/soft_key_mid"
android:textColor="@color/button_text" />
<include
layout="@layout/rbutton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_marginTop="0dp"
android:layout_marginEnd="0dp" />
</RelativeLayout>
<Button
android:id="@+id/main_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="1px"
android:layout_marginRight="1px"
android:layout_weight="3"
android:background="@drawable/button_custom"
android:clickable="true"
android:focusable="false"
android:longClickable="true"
android:text="⌫"
android:textColor="@color/button_text"
android:textSize="24sp" />
</LinearLayout>

View file

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:orientation="vertical"
android:padding="5dp" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginTop="0dp"
android:layout_marginBottom="2dp"
android:drawableLeft="@drawable/rcycle"
android:drawablePadding="5dp"
android:gravity="center_vertical"
android:padding="2dp"
android:paddingTop="4dp"
android:text="@string/main_right_upper"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/button_text"
android:textSize="15sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:drawableLeft="@drawable/holdicon"
android:drawablePadding="3dp"
android:gravity="center_vertical"
android:padding="0dp"
android:text="@string/main_right_lower"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/button_text"
android:textSize="11sp" />
</LinearLayout>

View file

@ -1,202 +0,0 @@
<?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:gravity="center_horizontal"
android:orientation="vertical"
android:padding="2dp" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="2dp"
android:paddingRight="2dp" >
<TextView
android:id="@+id/text_keyone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/key_one"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keytwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="false"
android:background="@drawable/key_two"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keythree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/key_three"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="2dp"
android:paddingRight="2dp" >
<TextView
android:id="@+id/text_keyfour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/key_four"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keyfive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/key_five"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keysix"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/key_six"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="2dp"
android:paddingRight="2dp" >
<TextView
android:id="@+id/text_keyseven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/key_seven"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keyeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/key_eight"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keynine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/key_nine"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="2dp"
android:paddingRight="2dp" >
<TextView
android:id="@+id/text_keystar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/key_star"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="@string/symbol_prev"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text" />
<TextView
android:id="@+id/text_keyzero"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/key_zero"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text"
android:textSize="30sp" />
<TextView
android:id="@+id/text_keypound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/key_pound"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="@string/symbol_next"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/key_text" />
</RelativeLayout>
</LinearLayout>