mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-04 10:39:25 +00:00
Refactoring
This commit is contained in:
parent
6cc653ce77
commit
35df7935df
4 changed files with 48 additions and 6 deletions
|
@ -1868,7 +1868,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
} else
|
||||
_uri = uri;
|
||||
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_link, null);
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_open_link, null);
|
||||
final EditText etLink = view.findViewById(R.id.etLink);
|
||||
TextView tvInsecure = view.findViewById(R.id.tvInsecure);
|
||||
final TextView tvOwner = view.findViewById(R.id.tvOwner);
|
||||
|
|
|
@ -345,10 +345,10 @@ public class FragmentCompose extends FragmentBase {
|
|||
@Override
|
||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||
menu.add(1, R.string.title_style_bold, 1, R.string.title_style_bold).setIcon(R.drawable.baseline_format_bold_24);
|
||||
menu.add(1, R.string.title_style_italic, 1, R.string.title_style_italic).setIcon(R.drawable.baseline_format_italic_24);
|
||||
menu.add(1, R.string.title_style_underline, 1, R.string.title_style_underline).setIcon(R.drawable.baseline_format_underlined_24);
|
||||
menu.add(1, R.string.title_style_size, 1, R.string.title_style_size).setIcon(R.drawable.baseline_format_size_24);
|
||||
menu.add(1, R.string.title_style_color, 1, R.string.title_style_color).setIcon(R.drawable.baseline_format_color_text_24);
|
||||
menu.add(1, R.string.title_style_italic, 2, R.string.title_style_italic).setIcon(R.drawable.baseline_format_italic_24);
|
||||
menu.add(1, R.string.title_style_underline, 3, R.string.title_style_underline).setIcon(R.drawable.baseline_format_underlined_24);
|
||||
menu.add(1, R.string.title_style_size, 4, R.string.title_style_size).setIcon(R.drawable.baseline_format_size_24);
|
||||
menu.add(1, R.string.title_style_color, 5, R.string.title_style_color).setIcon(R.drawable.baseline_format_color_text_24);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
uri = null;
|
||||
}
|
||||
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_link, null);
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_insert_link, null);
|
||||
final EditText etLink = view.findViewById(R.id.etLink);
|
||||
final TextView tvInsecure = view.findViewById(R.id.tvInsecure);
|
||||
|
||||
|
|
42
app/src/main/res/layout/dialog_insert_link.xml
Normal file
42
app/src/main/res/layout/dialog_insert_link.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOpenLink"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:labelFor="@+id/etLink"
|
||||
android:text="@string/title_style_link"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
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"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOpenLink" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInsecure"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/title_insecure_link"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/etLink" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Reference in a new issue