diff options
5 files changed, 24 insertions, 28 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java index 3504bb6f..f180b444 100644 --- a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java +++ b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java @@ -111,13 +111,12 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download setUpInitialUI(); - setUpProviderAPIResultReceiver(); + initProviderList(); - setUpProviderList(); - - if(savedInstanceState != null) { + if(savedInstanceState != null) restoreState(savedInstanceState); - } + else + setUpProviderAPIResultReceiver(); } private void restoreState(Bundle savedInstanceState) { @@ -154,10 +153,6 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download progressbar_description.setVisibility(TextView.INVISIBLE); } - private void setUpProviderList() { - initProviderList(); - } - @Override protected void onDestroy() { super.onDestroy(); diff --git a/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml b/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml index bb169e00..50bb5d0b 100644 --- a/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml +++ b/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml @@ -5,6 +5,12 @@ android:layout_height="match_parent" tools:context=".ConfigurationWizard" > + <ListView + android:id="@+id/provider_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:drawSelectorOnTop="false" /> + <ProgressBar android:id="@+id/progressbar_configuration_wizard" style="?android:attr/progressBarStyleHorizontal" @@ -24,4 +30,4 @@ android:layout_centerHorizontal="true" android:textColor="@android:color/holo_blue_bright" /> -</RelativeLayout>
\ No newline at end of file +</RelativeLayout> diff --git a/app/src/main/res/layout-xlarge/provider_list_item.xml b/app/src/main/res/layout-xlarge/provider_list_item.xml index ec5db117..728a61be 100644 --- a/app/src/main/res/layout-xlarge/provider_list_item.xml +++ b/app/src/main/res/layout-xlarge/provider_list_item.xml @@ -24,7 +24,7 @@ android:mode="twoLine" > - <TextView android:id="@android:id/text1" + <TextView android:id="@+id/provider_domain" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft" @@ -33,11 +33,11 @@ android:textAppearance="?android:attr/textAppearanceListItem" /> - <TextView android:id="@android:id/text2" + <TextView android:id="@+id/provider_name" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@android:id/text1" - android:layout_alignLeft="@android:id/text1" + android:layout_below="@id/provider_domain" + android:layout_alignLeft="@id/provider_domain" android:textSize = "24sp" /> diff --git a/app/src/main/res/layout/configuration_wizard_activity.xml b/app/src/main/res/layout/configuration_wizard_activity.xml index a5bca1e9..71cd5314 100644 --- a/app/src/main/res/layout/configuration_wizard_activity.xml +++ b/app/src/main/res/layout/configuration_wizard_activity.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" tools:context=".ConfigurationWizard" > - <ListView + <ListView android:id="@+id/provider_list" android:layout_width="match_parent" android:layout_height="match_parent" @@ -28,4 +28,4 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:layout_centerHorizontal="true" android:textColor="@android:color/holo_blue_bright" /> -</RelativeLayout>
\ No newline at end of file +</RelativeLayout> diff --git a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java index 0ed0f0ba..e5095f00 100644 --- a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java +++ b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java @@ -92,7 +92,7 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download } @Override - protected void onSaveInstanceState(Bundle outState) { + protected void onSaveInstanceState(@NotNull Bundle outState) { if(mProgressBar != null) outState.putInt(PROGRESSBAR_NUMBER, mProgressBar.getProgress()); if(progressbar_description != null) @@ -109,16 +109,15 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download preferences = getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE); fragment_manager = new FragmentManagerEnhanced(getFragmentManager()); provider_manager = ProviderManager.getInstance(getAssets(), getExternalFilesDir(null)); - - setUpInitialUI(); - setUpProviderAPIResultReceiver(); - - setUpProviderList(); + setUpInitialUI(); - if ( savedInstanceState != null ) { + initProviderList(); + + if (savedInstanceState != null) restoreState(savedInstanceState); - } + else + setUpProviderAPIResultReceiver(); } private void restoreState(Bundle savedInstanceState) { @@ -156,10 +155,6 @@ implements NewProviderDialogInterface, ProviderDetailFragmentInterface, Download progressbar_description.setVisibility(TextView.INVISIBLE); } - private void setUpProviderList() { - initProviderList(); - } - @Override protected void onDestroy() { super.onDestroy(); |