Added keyboard legend

pull/177/head
M66B 5 years ago
parent 6b5c515bfb
commit 5fdc673292

@ -98,7 +98,7 @@ public class FragmentLegend extends FragmentBase {
@Override
public int getCount() {
return 4;
return 5;
}
@Override
@ -112,6 +112,8 @@ public class FragmentLegend extends FragmentBase {
return new FragmentLegend().setLayout(R.layout.fragment_legend_messages);
case 3:
return new FragmentLegend().setLayout(R.layout.fragment_legend_compose);
case 4:
return new FragmentLegend().setLayout(R.layout.fragment_legend_keyboard);
default:
throw new IllegalArgumentException();
}
@ -128,6 +130,8 @@ public class FragmentLegend extends FragmentBase {
return getString(R.string.title_legend_section_messages);
case 3:
return getString(R.string.title_legend_section_compose);
case 4:
return getString(R.string.title_legend_section_keyboard);
default:
throw new IllegalArgumentException();
}

@ -4451,8 +4451,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
return (!up || onViewThread(context));
case KeyEvent.KEYCODE_A:
return (up && onArchive(context));
case KeyEvent.KEYCODE_B:
return (up && onBody(context));
case KeyEvent.KEYCODE_C:
return (up && onCompose(context));
case KeyEvent.KEYCODE_D:
@ -4467,6 +4465,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
return (up && onReply(context));
case KeyEvent.KEYCODE_S:
return (up && onSelect(context));
case KeyEvent.KEYCODE_T:
return (up && onFocusText(context));
default:
return false;
}
@ -4568,7 +4568,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
return true;
}
private boolean onBody(Context context) {
private boolean onFocusText(Context context) {
int expanded = (values.containsKey("expanded") ? values.get("expanded").size() : 0);
if (expanded != 1)
return false;

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp"
android:scrollbarStyle="outsideOverlay"
tools:context="eu.faircode.email.ActivityView">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvEnter"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="Enter"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/baseline_person_add_24" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvPick"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_enter"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvEnter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvEnter"
app:layout_constraintTop_toTopOf="@id/tvEnter" />
<TextView
android:id="@+id/tvA"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="A"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvEnter" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvA"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvA"
app:layout_constraintTop_toTopOf="@id/tvA" />
<TextView
android:id="@+id/tvC"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="C"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvA" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_c"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvC"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvC"
app:layout_constraintTop_toTopOf="@id/tvC" />
<TextView
android:id="@+id/tvD"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="D"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvC" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_d"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvD"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvD"
app:layout_constraintTop_toTopOf="@id/tvD" />
<TextView
android:id="@+id/tvM"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="M"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvD" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_m"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvM"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvM"
app:layout_constraintTop_toTopOf="@id/tvM" />
<TextView
android:id="@+id/tvN"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="N"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvM" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_n"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvN"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvN"
app:layout_constraintTop_toTopOf="@id/tvN" />
<TextView
android:id="@+id/tvP"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="P"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvN" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_p"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvP"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvP"
app:layout_constraintTop_toTopOf="@id/tvP" />
<TextView
android:id="@+id/tvR"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="R"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvP" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_r"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvR"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvR"
app:layout_constraintTop_toTopOf="@id/tvR" />
<TextView
android:id="@+id/tvS"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="S"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvR" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_s"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvS"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvS"
app:layout_constraintTop_toTopOf="@id/tvS" />
<TextView
android:id="@+id/tvT"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="T"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvS" />
<eu.faircode.email.FixedTextView
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/title_legend_t"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/tvT"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvT"
app:layout_constraintTop_toTopOf="@id/tvT" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

@ -974,6 +974,7 @@
<string name="title_legend_section_folders">Folders</string>
<string name="title_legend_section_messages">Messages</string>
<string name="title_legend_section_compose">Compose</string>
<string name="title_legend_section_keyboard">Keyboard</string>
<string name="title_legend_oauth">OAuth authorization</string>
<string name="title_legend_primary_connected">Account connected</string>
@ -1070,6 +1071,17 @@
<string name="title_legend_count">Count</string>
<string name="title_legend_folder_type">Folder type</string>
<string name="title_legend_enter">Open</string>
<string name="title_legend_a">Archive</string>
<string name="title_legend_c">Compose</string>
<string name="title_legend_d">Delete/trash</string>
<string name="title_legend_m">More/menu</string>
<string name="title_legend_n">Next</string>
<string name="title_legend_p">Previous</string>
<string name="title_legend_r">Reply/answer</string>
<string name="title_legend_s">Select/deselect</string>
<string name="title_legend_t">Focus text</string>
<string name="title_hint_folder_actions">Long press a folder for options, like adding a folder to the navigation menu for quick access</string>
<string name="title_hint_folder_sync">To limit battery and network usage not all folders and not all messages will be synchronized by default</string>
<string name="title_hint_support">If you have a question or a problem, please use the support menu to get help</string>

Loading…
Cancel
Save