Fixed back from activities

pull/214/head
M66B 1 year ago
parent 1143f72660
commit fb1b1f1a0e

@ -159,7 +159,10 @@ public class ActivityAMP extends ActivityBase {
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
int itemId = item.getItemId();
if (itemId == R.id.menu_force_light) {
if (itemId == android.R.id.home) {
finish();
return true;
} else if (itemId == R.id.menu_force_light) {
onMenuForceLight();
return true;
}

@ -23,6 +23,7 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
@ -56,6 +57,16 @@ public class ActivityClear extends ActivityBase {
});
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
static Intent getIntent(Context context) {
return new Intent(context, ActivityClear.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |

@ -26,6 +26,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
@ -69,6 +70,16 @@ public class ActivityDSN extends ActivityBase {
load();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
private void load() {
Uri uri = getIntent().getData();
Log.i("DSN uri=" + uri);

@ -33,6 +33,7 @@ import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
@ -86,6 +87,16 @@ public class ActivityDmarc extends ActivityBase {
load();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
private void load() {
Intent intent = getIntent();
Uri uri = intent.getData();

@ -516,7 +516,10 @@ public class ActivityEML extends ActivityBase {
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
int itemId = item.getItemId();
if (itemId == R.id.menu_save) {
if (itemId == android.R.id.home) {
finish();
return true;
} else if (itemId == R.id.menu_save) {
onMenuSave();
return true;
} else if (itemId == R.id.menu_junk) {

@ -21,6 +21,7 @@ package eu.faircode.email;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
@ -62,6 +63,16 @@ public class ActivityError extends ActivityBase {
load();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
private void load() {
Intent intent = getIntent();
String type = intent.getStringExtra("type");

@ -262,7 +262,10 @@ public class ActivitySignature extends ActivityBase {
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
int itemId = item.getItemId();
if (itemId == R.id.menu_help) {
if (itemId == android.R.id.home) {
finish();
return true;
} else if (itemId == R.id.menu_help) {
onMenuHelp();
return true;
} else if (itemId == R.id.menu_edit_html) {

Loading…
Cancel
Save