Simplification

pull/206/head
M66B 3 years ago
parent 46bf9d2cf7
commit 86a665b1a2

@ -4338,19 +4338,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
onActionOpenFullConfirmed(message);
else {
LayoutInflater inflater = LayoutInflater.from(context);
View dview = inflater.inflate(R.layout.dialog_ask_again, null, false);
final TextView tvMessage = dview.findViewById(R.id.tvMessage);
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
final TextView tvRemark = dview.findViewById(R.id.tvRemark);
final CheckBox cbConfirm = dview.findViewById(R.id.cbConfirm);
View dview = inflater.inflate(R.layout.dialog_ask_full, null, false);
final CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
final TextView tvAccept = dview.findViewById(R.id.tvAccept);
tvMessage.setText(R.string.title_ask_show_html);
ibInfo.setVisibility(View.GONE);
tvRemark.setText(R.string.title_ask_show_image_hint);
cbConfirm.setVisibility(View.GONE);
tvAccept.setVisibility(View.GONE);
new AlertDialog.Builder(context)
.setView(dview)

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<eu.faircode.email.ScrollViewEx 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="24dp"
android:scrollbarStyle="outsideOverlay">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<eu.faircode.email.FixedTextView
android:id="@+id/tvMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:text="@string/title_ask_show_html"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_ask_show_image_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
<CheckBox
android:id="@+id/cbNotAgain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_no_ask_again"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvRemark" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>
Loading…
Cancel
Save