diff options
Diffstat (limited to 'OpenKeychain/src/main')
26 files changed, 85 insertions, 62 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java index 0e9678980..7d77a989d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java @@ -27,6 +27,7 @@ import android.view.View; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.ui.BaseActivity; import org.sufficientlysecure.keychain.ui.util.ActionBarHelper; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.remote.AccountSettings; @@ -35,7 +36,7 @@ import org.sufficientlysecure.keychain.operations.results.OperationResult.LogTyp import org.sufficientlysecure.keychain.operations.results.SingletonResult; import org.sufficientlysecure.keychain.util.Log; -public class AccountSettingsActivity extends ActionBarActivity { +public class AccountSettingsActivity extends BaseActivity { private Uri mAccountUri; private AccountSettingsFragment mAccountSettingsFragment; @@ -55,7 +56,6 @@ public class AccountSettingsActivity extends ActionBarActivity { } }); - setContentView(R.layout.api_account_settings_activity); mAccountSettingsFragment = (AccountSettingsFragment) getSupportFragmentManager().findFragmentById( R.id.api_account_settings_fragment); @@ -73,6 +73,11 @@ public class AccountSettingsActivity extends ActionBarActivity { } @Override + protected void initLayout() { + setContentView(R.layout.api_account_settings_activity); + } + + @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.api_account_settings, menu); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java index 56e3b22e2..d84a03698 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java @@ -33,9 +33,10 @@ import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.remote.AppSettings; import org.sufficientlysecure.keychain.operations.results.OperationResult; +import org.sufficientlysecure.keychain.ui.BaseActivity; import org.sufficientlysecure.keychain.util.Log; -public class AppSettingsActivity extends ActionBarActivity { +public class AppSettingsActivity extends BaseActivity { private Uri mAppUri; private AppSettingsFragment mSettingsFragment; @@ -49,12 +50,11 @@ public class AppSettingsActivity extends ActionBarActivity { super.onCreate(savedInstanceState); // let the actionbar look like Android's contact app - ActionBar actionBar = getSupportActionBar(); - actionBar.setDisplayHomeAsUpEnabled(true); - actionBar.setIcon(android.R.color.transparent); - actionBar.setHomeButtonEnabled(true); +// ActionBar actionBar = getSupportActionBar(); +// actionBar.setDisplayHomeAsUpEnabled(true); +// actionBar.setIcon(android.R.color.transparent); +// actionBar.setHomeButtonEnabled(true); - setContentView(R.layout.api_app_settings_activity); mSettingsFragment = (AppSettingsFragment) getSupportFragmentManager().findFragmentById( R.id.api_app_settings_fragment); @@ -72,6 +72,11 @@ public class AppSettingsActivity extends ActionBarActivity { } @Override + protected void initLayout() { + setContentView(R.layout.api_app_settings_activity); + } + + @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.api_app_settings, menu); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListActivity.java index ba27b22f2..079b3065e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListActivity.java @@ -32,8 +32,8 @@ public class AppsListActivity extends DrawerActivity { } @Override - protected int getLayoutResource() { - return R.layout.api_apps_list_activity; + protected void initLayout() { + setContentView(R.layout.api_apps_list_activity); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java index d7b723eb0..a9a7c75f5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java @@ -39,6 +39,7 @@ import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.remote.AccountSettings; import org.sufficientlysecure.keychain.remote.AppSettings; +import org.sufficientlysecure.keychain.ui.BaseActivity; import org.sufficientlysecure.keychain.ui.SelectPublicKeyFragment; import org.sufficientlysecure.keychain.ui.util.ActionBarHelper; import org.sufficientlysecure.keychain.ui.util.Notify; @@ -46,7 +47,7 @@ import org.sufficientlysecure.keychain.util.Log; import java.util.ArrayList; -public class RemoteServiceActivity extends ActionBarActivity { +public class RemoteServiceActivity extends BaseActivity { public static final String ACTION_REGISTER = Constants.INTENT_PREFIX + "API_ACTIVITY_REGISTER"; public static final String ACTION_CREATE_ACCOUNT = Constants.INTENT_PREFIX @@ -96,6 +97,11 @@ public class RemoteServiceActivity extends ActionBarActivity { handleActions(getIntent(), savedInstanceState); } + @Override + protected void initLayout() { + // done in handleActions() + } + protected void handleActions(Intent intent, Bundle savedInstanceState) { String action = intent.getAction(); @@ -108,6 +114,7 @@ public class RemoteServiceActivity extends ActionBarActivity { Log.d(Constants.TAG, "ACTION_REGISTER packageName: " + packageName); setContentView(R.layout.api_remote_register_app); + initToolbar(); mAppSettingsFragment = (AppSettingsFragment) getSupportFragmentManager().findFragmentById( R.id.api_app_settings_fragment); @@ -145,6 +152,7 @@ public class RemoteServiceActivity extends ActionBarActivity { final String accName = extras.getString(EXTRA_ACC_NAME); setContentView(R.layout.api_remote_create_account); + initToolbar(); mAccSettingsFragment = (AccountSettingsFragment) getSupportFragmentManager().findFragmentById( R.id.api_account_settings_fragment); @@ -248,6 +256,9 @@ public class RemoteServiceActivity extends ActionBarActivity { } } + setContentView(R.layout.api_remote_select_pub_keys); + initToolbar(); + // Inflate a "Done"/"Cancel" custom action bar view ActionBarHelper.setTwoButtonView(getSupportActionBar(), R.string.btn_okay, R.drawable.ic_action_done, @@ -272,7 +283,6 @@ public class RemoteServiceActivity extends ActionBarActivity { } ); - setContentView(R.layout.api_remote_select_pub_keys); // set text on view TextView textView = (TextView) findViewById(R.id.api_select_pub_keys_text); @@ -303,6 +313,9 @@ public class RemoteServiceActivity extends ActionBarActivity { Spannable redErrorMessage = new SpannableString(errorMessage); redErrorMessage.setSpan(new ForegroundColorSpan(Color.RED), 0, errorMessage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + setContentView(R.layout.api_remote_error_message); + initToolbar(); + // Inflate a "Done" custom action bar view ActionBarHelper.setOneButtonView(getSupportActionBar(), R.string.btn_okay, R.drawable.ic_action_done, @@ -316,8 +329,6 @@ public class RemoteServiceActivity extends ActionBarActivity { } ); - setContentView(R.layout.api_remote_error_message); - // set text on view TextView textView = (TextView) findViewById(R.id.api_app_error_message_text); textView.setText(redErrorMessage); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BaseActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BaseActivity.java index 6e83f6101..ee73bb8f2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BaseActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BaseActivity.java @@ -32,7 +32,13 @@ public abstract class BaseActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(getLayoutResource()); + initLayout(); + initToolbar(); + } + + protected abstract void initLayout(); + + protected void initToolbar() { toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar != null) { setSupportActionBar(toolbar); @@ -40,8 +46,6 @@ public abstract class BaseActivity extends ActionBarActivity { } } - protected abstract int getLayoutResource(); - protected void setActionBarIcon(int iconRes) { toolbar.setNavigationIcon(iconRes); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java index 24d002368..6850eca13 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java @@ -33,8 +33,8 @@ public class CertifyKeyActivity extends BaseActivity { public static final String EXTRA_CERTIFY_KEY_ID = "certify_key_id"; @Override - protected int getLayoutResource() { - return R.layout.certify_key_activity; + protected void initLayout() { + setContentView(R.layout.certify_key_activity); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyActivity.java index c95ad90a1..82d3279f4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyActivity.java @@ -47,8 +47,8 @@ public class CreateKeyActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.create_key_activity; + protected void initLayout() { + setContentView(R.layout.create_key_activity); } public void loadFragment(Bundle savedInstanceState, Fragment fragment, int action) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java index ccff3fd6a..a84461a92 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java @@ -65,8 +65,8 @@ public class DecryptActivity extends DrawerActivity { } @Override - protected int getLayoutResource() { - return R.layout.decrypt_activity; + protected void initLayout() { + setContentView(R.layout.decrypt_activity); } @TargetApi(VERSION_CODES.HONEYCOMB) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java index 5bf0e75dd..b3521ebcc 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java @@ -96,9 +96,8 @@ public abstract class DrawerActivity extends BaseActivity { // enable ActionBar app icon to behave as action to toggle nav drawer // if the drawer is not locked if (!mIsDrawerLocked) { - // TODO -// getSupportActionBar().setDisplayHomeAsUpEnabled(true); -// getSupportActionBar().setHomeButtonEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setHomeButtonEnabled(true); } // ActionBarDrawerToggle ties together the the proper interactions diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java index 1615430e7..492c81758 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java @@ -48,8 +48,8 @@ public class EditKeyActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.edit_key_activity; + protected void initLayout() { + setContentView(R.layout.edit_key_activity); } private void loadFragment(Bundle savedInstanceState, Uri dataUri, SaveKeyringParcel saveKeyringParcel) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java index d0e66156c..1494d05e1 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java @@ -326,8 +326,8 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi } @Override - protected int getLayoutResource() { - return R.layout.encrypt_files_activity; + protected void initLayout() { + setContentView(R.layout.encrypt_files_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java index 0850ead3b..757d1fb02 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java @@ -303,8 +303,8 @@ public class EncryptTextActivity extends EncryptActivity implements EncryptActiv } @Override - protected int getLayoutResource() { - return R.layout.encrypt_text_activity; + protected void initLayout() { + setContentView(R.layout.encrypt_text_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java index 277b08c48..e5db48304 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java @@ -73,8 +73,8 @@ public class FirstTimeActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.first_time_activity; + protected void initLayout() { + setContentView(R.layout.first_time_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java index 412de9984..8d4d3c915 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java @@ -98,7 +98,7 @@ public class HelpActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.help_activity; + protected void initLayout() { + setContentView(R.layout.help_activity); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index 1e413f5ac..f1677cb67 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -102,8 +102,8 @@ public class ImportKeysActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.import_keys_activity; + protected void initLayout() { + setContentView(R.layout.import_keys_activity); } protected void handleActions(Bundle savedInstanceState, Intent intent) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java index 6b3cf5fe4..7d037f85d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java @@ -65,12 +65,12 @@ public class KeyListActivity extends DrawerActivity { mExportHelper = new ExportHelper(this); // now setup navigation drawer in DrawerActivity... -// activateDrawerNavigation(savedInstanceState); + activateDrawerNavigation(savedInstanceState); } @Override - protected int getLayoutResource() { - return R.layout.key_list_activity; + protected void initLayout() { + setContentView(R.layout.key_list_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/LogDisplayActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/LogDisplayActivity.java index f5eac09b1..fd74e1654 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/LogDisplayActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/LogDisplayActivity.java @@ -45,8 +45,8 @@ public class LogDisplayActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.log_display_activity; + protected void initLayout() { + setContentView(R.layout.log_display_activity); } }
\ No newline at end of file diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java index 53b17654c..3a70502ea 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java @@ -122,8 +122,8 @@ public class NfcActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.nfc_activity; + protected void initLayout() { + setContentView(R.layout.nfc_activity); } /** diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcIntentActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcIntentActivity.java index bb5277119..945d98379 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcIntentActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcIntentActivity.java @@ -88,8 +88,8 @@ public class NfcIntentActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.nfc_activity; + protected void initLayout() { + setContentView(R.layout.nfc_activity); } /** diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/QrCodeViewActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/QrCodeViewActivity.java index b0343a961..42ad2258a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/QrCodeViewActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/QrCodeViewActivity.java @@ -107,8 +107,8 @@ public class QrCodeViewActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.qr_code_activity; + protected void initLayout() { + setContentView(R.layout.qr_code_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java index deecffeea..d5193b2a2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java @@ -95,8 +95,8 @@ public class SafeSlingerActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.safe_slinger_activity; + protected void initLayout() { + setContentView(R.layout.safe_slinger_activity); } private void startExchange(long masterKeyId, int number) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java index 3ee1e14cc..f7e19706e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java @@ -100,8 +100,8 @@ public class SelectPublicKeyActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.select_public_key_activity; + protected void initLayout() { + setContentView(R.layout.select_public_key_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java index 297a35eb5..6cf346c97 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java @@ -85,8 +85,8 @@ public class UploadKeyActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.upload_key_activity; + protected void initLayout() { + setContentView(R.layout.upload_key_activity); } private void uploadKey() { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java index 5dede6627..a88b0f7cf 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java @@ -111,8 +111,8 @@ public class ViewCertActivity extends BaseActivity } @Override - protected int getLayoutResource() { - return R.layout.view_cert_activity; + protected void initLayout() { + setContentView(R.layout.view_cert_activity); } @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index e441ff414..ae80679d0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -168,8 +168,8 @@ public class ViewKeyActivity extends BaseActivity implements } @Override - protected int getLayoutResource() { - return R.layout.view_key_activity; + protected void initLayout() { + setContentView(R.layout.view_key_activity); } private void initTabs(Uri dataUri) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvancedActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvancedActivity.java index 9fdcaaaf9..7176232c5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvancedActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvancedActivity.java @@ -68,11 +68,10 @@ public class ViewKeyAdvancedActivity extends BaseActivity { } @Override - protected int getLayoutResource() { - return R.layout.view_key_advanced_activity; + protected void initLayout() { + setContentView(R.layout.view_key_advanced_activity); } - private void startFragment(Bundle savedInstanceState, Uri dataUri) { // However, if we're being restored from a previous state, // then we don't need to do anything and should return or else |