Merge pull request #5321 from plan3d/issue_4407_setTitle

This commit is contained in:
cketti 2021-06-01 15:46:28 +02:00 committed by GitHub
commit 240c935f85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 27 additions and 0 deletions

View file

@ -1,13 +1,22 @@
package com.fsck.k9.activity;
import android.content.Intent;
import android.os.Bundle;
import com.fsck.k9.BaseAccount;
import com.fsck.k9.ui.R;
public class ChooseAccount extends AccountList {
public static final String EXTRA_ACCOUNT_UUID = "com.fsck.k9.ChooseAccount_account_uuid";
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setTitle(R.string.choose_account_title);
}
@Override
protected void onAccountSelected(BaseAccount account) {
Intent intent = new Intent();

View file

@ -30,6 +30,7 @@ public class ChooseIdentity extends K9ListActivity {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setLayout(R.layout.list_content_simple);
setTitle(R.string.choose_identity_title);
getListView().setTextFilterEnabled(true);
getListView().setItemsCanFocus(false);

View file

@ -30,6 +30,7 @@ class EditIdentity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.edit_identity)
setTitle(R.string.edit_identity_title)
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
identityIndex = intent.getIntExtra(EXTRA_IDENTITY_INDEX, -1)

View file

@ -13,6 +13,7 @@ public class LauncherShortcuts extends AccountList {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setTitle(R.string.shortcuts_title);
// finish() immediately if we aren't supposed to be here
if (!Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())) {

View file

@ -31,6 +31,7 @@ public class ManageIdentities extends ChooseIdentity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.manage_identities_title);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

View file

@ -127,6 +127,7 @@ public class UpgradeDatabases extends K9Activity {
*/
private void initializeLayout() {
setLayout(R.layout.upgrade_databases);
setTitle(R.string.upgrade_databases_title);
mUpgradeText = findViewById(R.id.databaseUpgradeText);
}

View file

@ -33,6 +33,7 @@ class AccountSetupAccountType : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.account_setup_account_type)
setTitle(R.string.account_setup_account_type_title)
decodeArguments()

View file

@ -75,6 +75,7 @@ public class AccountSetupBasics extends K9Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setLayout(R.layout.account_setup_basics);
setTitle(R.string.account_setup_basics_title);
mEmailView = findViewById(R.id.account_email);
mPasswordView = findViewById(R.id.account_password);
mClientCertificateCheckBox = findViewById(R.id.account_client_certificate);

View file

@ -46,6 +46,7 @@ public class AccountSetupComposition extends K9Activity {
mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
setLayout(R.layout.account_setup_composition);
setTitle(R.string.account_settings_composition_title);
/*
* If we're being reloaded we override the original account with the one

View file

@ -121,6 +121,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setLayout(R.layout.account_setup_incoming);
setTitle(R.string.account_setup_incoming_title);
mUsernameView = findViewById(R.id.account_username);
mPasswordView = findViewById(R.id.account_password);

View file

@ -42,6 +42,8 @@ public class AccountSetupNames extends K9Activity implements OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setLayout(R.layout.account_setup_names);
setTitle(R.string.account_setup_names_title);
mDescription = findViewById(R.id.account_description);
mName = findViewById(R.id.account_name);
mDoneButton = findViewById(R.id.done);

View file

@ -43,6 +43,7 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setLayout(R.layout.account_setup_options);
setTitle(R.string.account_setup_options_title);
mCheckFrequencyView = findViewById(R.id.account_check_frequency);
mDisplayCountView = findViewById(R.id.account_display_count);

View file

@ -96,6 +96,7 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setLayout(R.layout.account_setup_outgoing);
setTitle(R.string.account_setup_outgoing_title);
String accountUuid = getIntent().getStringExtra(EXTRA_ACCOUNT);
mAccount = Preferences.getPreferences(this).getAccount(accountUuid);

View file

@ -51,6 +51,7 @@ class ChooseFolderActivity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.folder_list)
setTitle(R.string.choose_folder_title)
if (!decodeArguments(savedInstanceState)) {
finish()

View file

@ -38,6 +38,7 @@ class AutocryptKeyTransferActivity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.crypto_key_transfer)
setTitle(R.string.ac_transfer_title)
val accountUuid = intent.getStringExtra(EXTRA_ACCOUNT)

View file

@ -18,6 +18,7 @@ class ManageFoldersActivity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.activity_manage_folders)
setTitle(R.string.folders_action)
val accountUuid = intent.getStringExtra(EXTRA_ACCOUNT) ?: error("Missing Intent extra '$EXTRA_ACCOUNT'")

View file

@ -16,6 +16,7 @@ class MessageSourceActivity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.message_view_headers_activity)
setTitle(R.string.show_headers_action)
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
if (savedInstanceState == null) {

View file

@ -16,6 +16,7 @@ class OnboardingActivity : K9Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setLayout(R.layout.activity_onboarding)
setTitle(R.string.account_setup_basics_title)
initializeActionBar()
}