mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Specify the input method actions
This commit is contained in:
parent
30b05b1843
commit
f757e847e0
9 changed files with 43 additions and 9 deletions
|
@ -266,6 +266,18 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
etTo.setMaxLines(Integer.MAX_VALUE);
|
||||
etTo.setHorizontallyScrolling(false);
|
||||
|
||||
etCc.setMaxLines(Integer.MAX_VALUE);
|
||||
etCc.setHorizontallyScrolling(false);
|
||||
|
||||
etBcc.setMaxLines(Integer.MAX_VALUE);
|
||||
etBcc.setHorizontallyScrolling(false);
|
||||
|
||||
etSubject.setMaxLines(Integer.MAX_VALUE);
|
||||
etSubject.setHorizontallyScrolling(false);
|
||||
|
||||
View.OnClickListener onPick = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
|
|
@ -38,12 +38,14 @@ import android.text.TextUtils;
|
|||
import android.text.TextWatcher;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.Patterns;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
@ -149,6 +151,16 @@ public class FragmentQuickSetup extends FragmentBase {
|
|||
|
||||
tilPassword.setHintEnabled(false);
|
||||
|
||||
tilPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_GO) {
|
||||
onSave(true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
btnCheck.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
android:fontFamily="monospace"
|
||||
android:gravity="top"
|
||||
android:hint="@string/title_edit_html"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text|textMultiLine"
|
||||
android:minHeight="120dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
android:id="@+id/etKeyword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Keyword"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:text="Keyword"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvKeyword" />
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
android:id="@+id/etLink"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textUri|textMultiLine"
|
||||
android:text="https://email.faircode.eu/"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:autofillHints="password"
|
||||
android:hint="@string/title_setup_password"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textPassword"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -35,6 +36,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:autofillHints="password"
|
||||
android:hint="@string/title_setup_password_repeat"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:hint="@string/title_answer_name"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textCapSentences"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -35,6 +36,7 @@
|
|||
android:fontFamily="monospace"
|
||||
android:gravity="top"
|
||||
android:hint="@string/title_answer_text"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/vSeparatorHints"
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:hint="@string/title_to"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivToAdd"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -79,8 +79,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:hint="@string/title_cc"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivCcAdd"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -104,8 +104,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:hint="@string/title_bcc"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivBccAdd"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -130,8 +130,8 @@
|
|||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:hint="@string/title_subject"
|
||||
android:inputType="textEmailSubject|textCapSentences|textMultiLine"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textEmailSubject|textCapSentences"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:autofillHints="name"
|
||||
android:hint="@string/title_identity_name"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textPersonName"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -42,6 +43,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:autofillHints="emailAddress"
|
||||
android:hint="@string/title_identity_email"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -60,6 +62,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:autofillHints="password"
|
||||
android:hint="@string/title_setup_password"
|
||||
android:imeOptions="actionGo"
|
||||
android:inputType="textPassword"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
Loading…
Reference in a new issue