summaryrefslogtreecommitdiff
path: root/app/src/production
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-01-19 17:34:45 +0100
committerFup Duck <fupduck@sacknagel.com>2018-01-19 17:34:45 +0100
commitb065fa48e802487198ad73915dd017c4464e8c62 (patch)
treedf48491884de8e29c52db4794a3233fa34a4a6ff /app/src/production
parent1ccb2f9e1bcfaf8279ef9576b3bca233e37af61b (diff)
improve layout
* improve layout * gracefully handle orientation changes * respect small devices * set correct colors for buttons, error messages...
Diffstat (limited to 'app/src/production')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ConfigurationWizard.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/production/java/se/leap/bitmaskclient/ConfigurationWizard.java
index b1deae67..f7102508 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/production/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -40,18 +40,17 @@ public class ConfigurationWizard extends BaseConfigurationWizard {
public void showAndSelectProvider(String provider_main_url) {
try {
- selectedProvider = new Provider(new URL((provider_main_url)));
- adapter.add(selectedProvider);
+ provider = new Provider(new URL((provider_main_url)));
+ adapter.add(provider);
adapter.saveProviders();
- autoSelectProvider(selectedProvider);
+ autoSelectProvider(provider);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
private void autoSelectProvider(Provider provider) {
- selectedProvider = provider;
- onItemSelectedUi();
+ this.provider = provider;
onItemSelectedLogic();
}
@@ -63,15 +62,15 @@ public class ConfigurationWizard extends BaseConfigurationWizard {
mConfigState.setAction(SETTING_UP_PROVIDER);
Intent providerApiCommand = new Intent(this, ProviderAPI.class);
Bundle parameters = new Bundle();
- parameters.putString(Provider.MAIN_URL, selectedProvider.getMainUrl().toString());
- if (selectedProvider.hasCertificatePin()){
- parameters.putString(Provider.CA_CERT_FINGERPRINT, selectedProvider.certificatePin());
+ parameters.putString(Provider.MAIN_URL, provider.getMainUrl().toString());
+ if (provider.hasCertificatePin()){
+ parameters.putString(Provider.CA_CERT_FINGERPRINT, provider.certificatePin());
}
- if (selectedProvider.hasCaCert()) {
- parameters.putString(Provider.CA_CERT, selectedProvider.getCaCert());
+ if (provider.hasCaCert()) {
+ parameters.putString(Provider.CA_CERT, provider.getCaCert());
}
- if (selectedProvider.hasDefinition()) {
- parameters.putString(Provider.KEY, selectedProvider.getDefinition().toString());
+ if (provider.hasDefinition()) {
+ parameters.putString(Provider.KEY, provider.getDefinition().toString());
}
providerApiCommand.setAction(ProviderAPI.SET_UP_PROVIDER);
@@ -87,14 +86,14 @@ public class ConfigurationWizard extends BaseConfigurationWizard {
addAndSelectNewProvider(ProviderAPI.lastProviderMainUrl());
} else {
showProgressBar();
- adapter.hideAllBut(adapter.indexOf(selectedProvider));
+ adapter.hideAllBut(adapter.indexOf(provider));
Intent providerApiCommand = new Intent(this, ProviderAPI.class);
providerApiCommand.setAction(ProviderAPI.SET_UP_PROVIDER);
providerApiCommand.putExtra(ProviderAPI.RECEIVER_KEY, providerAPIResultReceiver);
Bundle parameters = new Bundle();
- parameters.putString(Provider.MAIN_URL, selectedProvider.getMainUrl().toString());
+ parameters.putString(Provider.MAIN_URL, provider.getMainUrl().toString());
providerApiCommand.putExtra(ProviderAPI.PARAMETERS, parameters);
startService(providerApiCommand);