-
-
Notifications
You must be signed in to change notification settings - Fork 352
Add support for language switching for autocorrect #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
91877b2
a115331
ef2e237
34b7d38
b23998e
c0b4e58
32c2d5e
8410289
ec9ddde
9ca14c6
0a35e43
80c03a6
6f6e069
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?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:orientation="horizontal" | ||
| android:paddingHorizontal="12dp" | ||
| android:paddingVertical="7dp" | ||
| android:gravity="center_vertical" | ||
| android:minHeight="28dp"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/dict_picker_item_name" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:layout_weight="1" | ||
| android:textSize="14sp" | ||
| android:textColor="?attr/colorLabel"/> | ||
|
|
||
| <TextView | ||
| android:id="@+id/dict_picker_item_check" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:text="✓" | ||
| android:textSize="16sp" | ||
| android:textColor="?attr/colorLabelActivated" | ||
| android:visibility="gone"/> | ||
|
|
||
| </LinearLayout> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:orientation="horizontal" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:background="?attr/colorKeyboard"> | ||
|
|
||
| <!-- Left column: autocorrect toggle at top, ABC back button at bottom --> | ||
| <LinearLayout | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" | ||
| android:gravity="center_horizontal" | ||
| android:paddingVertical="8dp" | ||
| android:paddingHorizontal="6dp"> | ||
|
|
||
| <TextView | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:text="Auto" | ||
| android:textColor="?attr/colorLabel" | ||
| android:textSize="11sp" | ||
| android:gravity="center"/> | ||
|
|
||
| <TextView | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:text="Correct" | ||
| android:textColor="?attr/colorLabel" | ||
| android:textSize="11sp" | ||
| android:gravity="center"/> | ||
|
|
||
| <Switch | ||
| android:id="@+id/dict_picker_autocorrect_switch" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginTop="4dp"/> | ||
|
|
||
| <Space | ||
| android:layout_width="0dp" | ||
| android:layout_height="0dp" | ||
| android:layout_weight="1"/> | ||
|
|
||
| <TextView | ||
| android:id="@+id/dict_picker_abc_btn" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:text="ABC" | ||
| android:textColor="?attr/colorLabel" | ||
| android:textSize="14sp" | ||
| android:gravity="center" | ||
| android:padding="8dp"/> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
| <!-- Vertical divider --> | ||
| <View | ||
| android:layout_width="1dp" | ||
| android:layout_height="match_parent" | ||
| android:background="?attr/colorKey"/> | ||
|
|
||
| <!-- Right column: scrollable list of dictionaries --> | ||
| <ScrollView | ||
| android:layout_width="0dp" | ||
| android:layout_height="match_parent" | ||
| android:layout_weight="1"> | ||
|
|
||
| <LinearLayout | ||
| android:id="@+id/dict_picker_list" | ||
| android:orientation="vertical" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:paddingVertical="4dp"/> | ||
|
|
||
| </ScrollView> | ||
|
|
||
| </LinearLayout> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My idea about the personal dictionary (that is maybe bad) is to present it as a text file with one word per line. Like the popup for entering a custom dictionary. |
||
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:fitsSystemWindows="true"> | ||
|
|
||
| <LinearLayout | ||
| android:id="@+id/personal_dict_list" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:orientation="vertical"/> | ||
|
|
||
| </ScrollView> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?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:orientation="horizontal" | ||
| android:paddingHorizontal="16dp" | ||
| android:paddingVertical="12dp" | ||
| android:gravity="center_vertical" | ||
| android:minHeight="48dp"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/personal_dict_entry_word" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:layout_weight="1" | ||
| android:textAppearance="?android:textAppearanceMedium"/> | ||
|
|
||
| <TextView | ||
| android:id="@+id/personal_dict_entry_replacement" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:textAppearance="?android:textAppearanceSmall" | ||
| android:textColor="?android:textColorSecondary" | ||
| android:maxWidth="160dp" | ||
| android:ellipsize="end" | ||
| android:singleLine="true"/> | ||
|
|
||
| </LinearLayout> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <item | ||
| android:id="@+id/personal_dict_menu_add" | ||
| android:title="@string/personal_dict_add_btn" | ||
| android:showAsAction="always"/> | ||
| </menu> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <keyboard bottom_row="false"> | ||
| <row height="0.95"> | ||
| <key key0="switch_back_dict_picker"/> | ||
| </row> | ||
| </keyboard> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dictionary picker is way too complex. What about a key (maybe on the right side of the suggestion bar) that cycles through dictionaries ?