diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-13 23:34:57 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-13 23:34:57 +0100 |
commit | 519209da6386f66df628dc426e260a5392209337 (patch) | |
tree | d78b458eeb83f4dbbf9ee615f17abe2eff0f4dc2 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote | |
parent | 9e4bfcbf2d9a5f77c1b16111466a0c4a16d1d5a3 (diff) | |
download | open-keychain-519209da6386f66df628dc426e260a5392209337.tar.gz open-keychain-519209da6386f66df628dc426e260a5392209337.tar.bz2 open-keychain-519209da6386f66df628dc426e260a5392209337.zip |
Layout fixes for registered apps
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote')
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java index 025929cfa..64c4c5e96 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java @@ -109,6 +109,15 @@ public class AppSettingsFragment extends Fragment implements return view; } + /** + * Set error String on key selection + * + * @param error + */ + public void setErrorOnSelectKeyFragment(String error) { + mSelectKeyFragment.setError(error); + } + private void initView(View view) { mSelectKeyFragment = (SelectSecretKeyLayoutFragment) getFragmentManager().findFragmentById( R.id.api_app_settings_select_key_fragment); @@ -182,7 +191,7 @@ public class AppSettingsFragment extends Fragment implements // TODO: Better: collapse/expand animation // final Animation animation2 = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, // Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, - // Animation.RELATIVE_TO_SELF, 0.0f); + // Animation.RELATIVE_TO_SELF, 0.0f);u // animation2.setDuration(150); mAdvancedSettingsButton.setOnClickListener(new OnClickListener() { diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java index f1e203733..7ab39fce1 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java @@ -125,9 +125,8 @@ public class RemoteServiceActivity extends ActionBarActivity { // user needs to select a key! if (mSettingsFragment.getAppSettings().getKeyId() == Id.key.none) { - Toast.makeText(RemoteServiceActivity.this, - R.string.api_register_error_select_key, Toast.LENGTH_LONG) - .show(); + mSettingsFragment.setErrorOnSelectKeyFragment( + getString(R.string.api_register_error_select_key)); } else { ProviderHelper.insertApiApp(RemoteServiceActivity.this, mSettingsFragment.getAppSettings()); |