Show add image type

This commit is contained in:
M66B 2021-02-04 13:33:02 +01:00
parent 3a9b9a3c34
commit 83f5f3f74b
2 changed files with 18 additions and 3 deletions

View File

@ -5551,6 +5551,7 @@ public class FragmentCompose extends FragmentBase {
boolean image_dialog = prefs.getBoolean("image_dialog", true);
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 CheckBox cbResize = dview.findViewById(R.id.cbResize);
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 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);
cbResize.setChecked(resize_images);
spResize.setEnabled(resize_images);

View File

@ -6,14 +6,26 @@
android:padding="24dp">
<eu.faircode.email.FixedTextView
android:id="@+id/tvAddImage"
android:layout_width="wrap_content"
android:id="@+id/tvTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:text="@string/title_add_image"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintEnd_toStartOf="@+id/ivType"
app:layout_constraintStart_toStartOf="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
android:id="@+id/rgAction"
android:layout_width="0dp"
@ -22,7 +34,7 @@
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAddImage">
app:layout_constraintTop_toBottomOf="@id/tvTitle">
<RadioButton
android:id="@+id/rbInline"