mirror of https://github.com/readrops/Readrops.git
Add back arrows to activities which didn't have one
This commit is contained in:
parent
05c291d29d
commit
ff15826fe4
|
@ -3,6 +3,7 @@ package com.readrops.app.activities;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
@ -48,6 +49,8 @@ public class AccountTypeListActivity extends AppCompatActivity {
|
|||
|
||||
fromMainActivity = getIntent().getBooleanExtra("fromMainActivity", false);
|
||||
|
||||
if (fromMainActivity)
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
adapter = new AccountTypeListAdapter(accountType -> {
|
||||
if (!(accountType == AccountType.LOCAL)) {
|
||||
|
@ -111,4 +114,15 @@ public class AccountTypeListActivity extends AppCompatActivity {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.readrops.app.activities;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Patterns;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
@ -50,6 +51,9 @@ public class AddAccountActivity extends AppCompatActivity {
|
|||
|
||||
accountToEdit = getIntent().getParcelableExtra(EDIT_ACCOUNT);
|
||||
|
||||
if (forwardResult || accountToEdit != null)
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
try {
|
||||
if (accountToEdit != null) {
|
||||
viewModel.setAccountType(accountToEdit.getAccountType());
|
||||
|
@ -226,4 +230,15 @@ public class AddAccountActivity extends AppCompatActivity {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class ManageFeedsFoldersActivity extends AppCompatActivity {
|
|||
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_manage_feeds_folders);
|
||||
setSupportActionBar(binding.manageFeedsFoldersToolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
binding.manageFeedsFoldersToolbar.setTitleTextColor(Color.WHITE);
|
||||
binding.manageFeedsFoldersTablayout.setTabTextColors(Color.WHITE, Color.WHITE);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.readrops.app.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
@ -18,6 +19,8 @@ public class SettingsActivity extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_settings);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
Account account = getIntent().getParcelableExtra(AccountSettingsFragment.ACCOUNT);
|
||||
|
||||
SettingsKey settingsKey = SettingsKey.values()[getIntent().getIntExtra(SETTINGS_KEY, -1)];
|
||||
|
@ -39,4 +42,15 @@ public class SettingsActivity extends AppCompatActivity {
|
|||
public enum SettingsKey {
|
||||
ACCOUNT_SETTINGS
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue