From 1daf2ebca708f5659a6d79f3581454c748c42f83 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 7 Feb 2018 15:08:51 +0100 Subject: #8823 update configuration wizard layout for tablets --- .../test/StartActivityDrawerTest.java | 4 +- .../AbstractProviderDetailActivity.java | 2 +- .../bitmaskclient/ProviderListBaseActivity.java | 2 +- .../drawer/NavigationDrawerFragment.java | 4 +- .../layout-sw600dp-port/a_provider_credentials.xml | 95 +++++++++++++ .../res/layout-sw600dp-port/a_provider_detail.xml | 94 +++++++++++++ .../layout-sw600dp-port/provider_list_activity.xml | 83 +++++++++++ .../res/layout-xlarge/a_provider_credentials.xml | 153 +++++++++------------ .../main/res/layout-xlarge/a_provider_detail.xml | 112 ++++++++------- .../configuration_wizard_activity.xml | 83 ----------- app/src/main/res/layout-xlarge/loading_screen.xml | 41 ++++++ app/src/main/res/layout-xlarge/provider_header.xml | 22 +++ .../res/layout-xlarge/provider_list_activity.xml | 83 +++++++++++ .../main/res/layout-xlarge/provider_list_item.xml | 36 ++--- .../main/res/layout-xlarge/single_list_item.xml | 28 ++++ app/src/main/res/layout/a_provider_credentials.xml | 58 ++++---- .../res/layout/configuration_wizard_activity.xml | 30 ---- app/src/main/res/layout/provider_header.xml | 6 +- app/src/main/res/layout/provider_list_activity.xml | 30 ++++ app/src/main/res/layout/provider_list_item.xml | 31 ++--- app/src/main/res/layout/single_list_item.xml | 12 ++ app/src/main/res/values/dimens.xml | 3 + 22 files changed, 669 insertions(+), 343 deletions(-) create mode 100644 app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml create mode 100644 app/src/main/res/layout-sw600dp-port/a_provider_detail.xml create mode 100644 app/src/main/res/layout-sw600dp-port/provider_list_activity.xml delete mode 100644 app/src/main/res/layout-xlarge/configuration_wizard_activity.xml create mode 100644 app/src/main/res/layout-xlarge/loading_screen.xml create mode 100644 app/src/main/res/layout-xlarge/provider_header.xml create mode 100644 app/src/main/res/layout-xlarge/provider_list_activity.xml create mode 100644 app/src/main/res/layout-xlarge/single_list_item.xml delete mode 100644 app/src/main/res/layout/configuration_wizard_activity.xml create mode 100644 app/src/main/res/layout/provider_list_activity.xml create mode 100644 app/src/main/res/layout/single_list_item.xml diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java index c7c6a86f..d7580c88 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java @@ -33,7 +33,7 @@ import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; import static se.leap.bitmaskclient.MainActivity.ACTION_SHOW_VPN_FRAGMENT; import static se.leap.bitmaskclient.R.id.aboutLayout; import static se.leap.bitmaskclient.R.id.accountList; -import static se.leap.bitmaskclient.R.id.configuration_wizard_layout; +import static se.leap.bitmaskclient.R.id.provider_list_layout; import static se.leap.bitmaskclient.R.id.drawer_layout; import static se.leap.bitmaskclient.R.id.eipServiceFragment; import static se.leap.bitmaskclient.R.id.log_layout; @@ -104,7 +104,7 @@ public class StartActivityDrawerTest { mActivityRule.launchActivity(intent); onData(anything()).inAdapterView(withId(settingsList)).atPosition(0).perform(click()); - onView(withId(configuration_wizard_layout)).check(matches(isDisplayed())); + onView(withId(provider_list_layout)).check(matches(isDisplayed())); } @Test diff --git a/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java b/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java index fbb27b58..ebfc1909 100644 --- a/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java @@ -55,7 +55,7 @@ public abstract class AbstractProviderDetailActivity extends ConfigWizardBaseAct options.setAdapter(new ArrayAdapter<>( this, - android.R.layout.simple_list_item_activated_1, + R.layout.single_list_item, android.R.id.text1, optionsList.toArray(new String[optionsList.size()]) )); diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java index 2b0c72db..bab8aa47 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java @@ -178,7 +178,7 @@ public abstract class ProviderListBaseActivity extends ConfigWizardBaseActivity } private void setUpInitialUI() { - setContentView(R.layout.configuration_wizard_activity); + setContentView(R.layout.provider_list_activity); setProviderHeaderText(R.string.setup_provider); hideProgressBar(); } diff --git a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java index 090e8d26..73c68e4c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java @@ -121,7 +121,7 @@ public class NavigationDrawerFragment extends Fragment { mDrawerSettingsListView.setAdapter(new ArrayAdapter( actionBar.getThemedContext(), - android.R.layout.simple_list_item_activated_1, + R.layout.single_list_item, android.R.id.text1, new String[]{ getString(R.string.switch_provider_menu_option), @@ -140,7 +140,7 @@ public class NavigationDrawerFragment extends Fragment { accountListAdapter = new ArrayAdapter<>(actionBar.getThemedContext(), - android.R.layout.simple_list_item_activated_1, + R.layout.single_list_item, android.R.id.text1); String providerName = ConfigHelper.getProviderName(preferences); diff --git a/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml b/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml new file mode 100644 index 00000000..4555343c --- /dev/null +++ b/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp-port/a_provider_detail.xml b/app/src/main/res/layout-sw600dp-port/a_provider_detail.xml new file mode 100644 index 00000000..bdafa45a --- /dev/null +++ b/app/src/main/res/layout-sw600dp-port/a_provider_detail.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp-port/provider_list_activity.xml b/app/src/main/res/layout-sw600dp-port/provider_list_activity.xml new file mode 100644 index 00000000..f02398c5 --- /dev/null +++ b/app/src/main/res/layout-sw600dp-port/provider_list_activity.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout-xlarge/a_provider_credentials.xml b/app/src/main/res/layout-xlarge/a_provider_credentials.xml index e259d4ed..82abb5cb 100644 --- a/app/src/main/res/layout-xlarge/a_provider_credentials.xml +++ b/app/src/main/res/layout-xlarge/a_provider_credentials.xml @@ -2,110 +2,93 @@ + tools:context=".ProviderCredentialsBaseActivity"> - + - + - + - + - + - + - + android:layout_height="wrap_content" /> - + - - - + - + android:layout_height="wrap_content" /> - - - + - - - - + + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/a_provider_detail.xml b/app/src/main/res/layout-xlarge/a_provider_detail.xml index d49e3129..18098079 100644 --- a/app/src/main/res/layout-xlarge/a_provider_detail.xml +++ b/app/src/main/res/layout-xlarge/a_provider_detail.xml @@ -2,74 +2,69 @@ + tools:context=".ProviderDetailActivity" + style="@style/BitmaskActivity"> - + - + - + - + - + - + - + - + android:layout_height="wrap_content"> @@ -90,8 +85,9 @@ android:id="@+id/provider_detail_options" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/standard_margin" - android:drawSelectorOnTop="false"/> + android:layout_marginTop="@dimen/list_view_margin_top" + android:drawSelectorOnTop="false" + /> diff --git a/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml b/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml deleted file mode 100644 index df82d5de..00000000 --- a/app/src/main/res/layout-xlarge/configuration_wizard_activity.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout-xlarge/loading_screen.xml b/app/src/main/res/layout-xlarge/loading_screen.xml new file mode 100644 index 00000000..2af6b411 --- /dev/null +++ b/app/src/main/res/layout-xlarge/loading_screen.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/provider_header.xml b/app/src/main/res/layout-xlarge/provider_header.xml new file mode 100644 index 00000000..45f8302b --- /dev/null +++ b/app/src/main/res/layout-xlarge/provider_header.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/provider_list_activity.xml b/app/src/main/res/layout-xlarge/provider_list_activity.xml new file mode 100644 index 00000000..cdffc24e --- /dev/null +++ b/app/src/main/res/layout-xlarge/provider_list_activity.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 728a61be..ec1e1242 100644 --- a/app/src/main/res/layout-xlarge/provider_list_item.xml +++ b/app/src/main/res/layout-xlarge/provider_list_item.xml @@ -1,44 +1,34 @@ - - - - + diff --git a/app/src/main/res/layout-xlarge/single_list_item.xml b/app/src/main/res/layout-xlarge/single_list_item.xml new file mode 100644 index 00000000..ad3de093 --- /dev/null +++ b/app/src/main/res/layout-xlarge/single_list_item.xml @@ -0,0 +1,28 @@ + + + + diff --git a/app/src/main/res/layout/a_provider_credentials.xml b/app/src/main/res/layout/a_provider_credentials.xml index 9a8955f2..4998effa 100644 --- a/app/src/main/res/layout/a_provider_credentials.xml +++ b/app/src/main/res/layout/a_provider_credentials.xml @@ -1,6 +1,7 @@ - + android:layout_height="wrap_content" /> - + - - - + - + android:layout_height="wrap_content" /> - - - + - - - - + + diff --git a/app/src/main/res/layout/configuration_wizard_activity.xml b/app/src/main/res/layout/configuration_wizard_activity.xml deleted file mode 100644 index 005913a4..00000000 --- a/app/src/main/res/layout/configuration_wizard_activity.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/provider_header.xml b/app/src/main/res/layout/provider_header.xml index 8a757181..6b08976c 100644 --- a/app/src/main/res/layout/provider_header.xml +++ b/app/src/main/res/layout/provider_header.xml @@ -4,8 +4,8 @@ @@ -14,7 +14,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="" - android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium" + android:textAppearance="@style/Base.TextAppearance.AppCompat.Headline" android:layout_marginTop="@dimen/standard_margin" android:layout_marginBottom="@dimen/standard_margin" /> diff --git a/app/src/main/res/layout/provider_list_activity.xml b/app/src/main/res/layout/provider_list_activity.xml new file mode 100644 index 00000000..6c5281b8 --- /dev/null +++ b/app/src/main/res/layout/provider_list_activity.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/provider_list_item.xml b/app/src/main/res/layout/provider_list_item.xml index 68ba7e31..1f0e135b 100644 --- a/app/src/main/res/layout/provider_list_item.xml +++ b/app/src/main/res/layout/provider_list_item.xml @@ -1,33 +1,22 @@ - - - @@ -35,9 +24,11 @@ - + diff --git a/app/src/main/res/layout/single_list_item.xml b/app/src/main/res/layout/single_list_item.xml new file mode 100644 index 00000000..652cb693 --- /dev/null +++ b/app/src/main/res/layout/single_list_item.xml @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index a6afc8bc..87d8e266 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -29,4 +29,7 @@ 300dp 16dp + + 56dp + 72dp \ No newline at end of file -- cgit v1.2.3