Use dialog button for settings

pull/199/head
M66B 4 years ago
parent df24a24f16
commit 8a490f8946

@ -3905,7 +3905,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
full ? R.layout.dialog_show_full : R.layout.dialog_show_images, null);
CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
CheckBox cbNotAgainDomain = dview.findViewById(R.id.cbNotAgainDomain);
Button btnMore = dview.findViewById(R.id.btnMore);
if (message.from == null || message.from.length == 0) {
cbNotAgain.setVisibility(View.GONE);
@ -3934,17 +3933,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
});
btnMore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent privacy = new Intent(v.getContext(), ActivitySetup.class)
.setAction("privacy")
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra("tab", "privacy");
v.getContext().startActivity(privacy);
}
});
if (full) {
TextView tvDark = dview.findViewById(R.id.tvDark);
CheckBox cbDark = dview.findViewById(R.id.cbDark);
@ -4018,6 +4006,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
})
.setNegativeButton(android.R.string.cancel, null)
.setNeutralButton(R.string.title_setup, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent privacy = new Intent(context, ActivitySetup.class)
.setAction("privacy")
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra("tab", "privacy");
context.startActivity(privacy);
}
})
.create();
owner.getLifecycle().addObserver(new LifecycleObserver() {

@ -72,17 +72,5 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbNotAgain" />
<Button
android:id="@+id/btnMore"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_more_horiz_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_more"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbNotAgainDomain" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -76,18 +76,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbNotAgain" />
<Button
android:id="@+id/btnMore"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_more_horiz_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_more"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbNotAgainDomain" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpTracking"
android:layout_width="0dp"

Loading…
Cancel
Save