mirror of https://github.com/M66B/FairEmail.git
Show add image type
This commit is contained in:
parent
3a9b9a3c34
commit
83f5f3f74b
|
@ -5551,6 +5551,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
boolean image_dialog = prefs.getBoolean("image_dialog", true);
|
boolean image_dialog = prefs.getBoolean("image_dialog", true);
|
||||||
|
|
||||||
final ViewGroup dview = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.dialog_add_image, null);
|
final ViewGroup dview = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.dialog_add_image, null);
|
||||||
|
final ImageView ivType = dview.findViewById(R.id.ivType);
|
||||||
final RadioGroup rgAction = dview.findViewById(R.id.rgAction);
|
final RadioGroup rgAction = dview.findViewById(R.id.rgAction);
|
||||||
final CheckBox cbResize = dview.findViewById(R.id.cbResize);
|
final CheckBox cbResize = dview.findViewById(R.id.cbResize);
|
||||||
final Spinner spResize = dview.findViewById(R.id.spResize);
|
final Spinner spResize = dview.findViewById(R.id.spResize);
|
||||||
|
@ -5559,6 +5560,8 @@ public class FragmentCompose extends FragmentBase {
|
||||||
final CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
|
final CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
|
||||||
final TextView tvNotAgain = dview.findViewById(R.id.tvNotAgain);
|
final TextView tvNotAgain = dview.findViewById(R.id.tvNotAgain);
|
||||||
|
|
||||||
|
ivType.setImageResource(title == R.string.title_attachment_photo
|
||||||
|
? R.drawable.twotone_photo_camera_24 : R.drawable.twotone_image_24);
|
||||||
rgAction.check(add_inline ? R.id.rbInline : R.id.rbAttach);
|
rgAction.check(add_inline ? R.id.rbInline : R.id.rbAttach);
|
||||||
cbResize.setChecked(resize_images);
|
cbResize.setChecked(resize_images);
|
||||||
spResize.setEnabled(resize_images);
|
spResize.setEnabled(resize_images);
|
||||||
|
|
|
@ -6,14 +6,26 @@
|
||||||
android:padding="24dp">
|
android:padding="24dp">
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
<eu.faircode.email.FixedTextView
|
||||||
android:id="@+id/tvAddImage"
|
android:id="@+id/tvTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
android:text="@string/title_add_image"
|
android:text="@string/title_add_image"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/ivType"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivType"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/title_add_image"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvTitle"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTitle"
|
||||||
|
app:srcCompat="@drawable/twotone_image_24" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/rgAction"
|
android:id="@+id/rgAction"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -22,7 +34,7 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvAddImage">
|
app:layout_constraintTop_toBottomOf="@id/tvTitle">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rbInline"
|
android:id="@+id/rbInline"
|
||||||
|
|
Loading…
Reference in New Issue