summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-03-17 19:09:40 +0100
committerParménides GV <parmegv@sdf.org>2014-03-29 01:46:28 +0100
commitb517bdfa4849e68516aa9653de03568b43a6d6b2 (patch)
tree8799ac24bca803d16ea4c9d2064b7cc356b622c2
parent8090cfa4dc8ba484d37cb0872dd1d0cdb6be866c (diff)
Configuration Wizard sized for tablets.
Including provider details.
-rw-r--r--res/layout-xlarge/configuration_wizard_activity.xml1
-rw-r--r--res/layout-xlarge/provider_detail_fragment.xml3
-rw-r--r--res/layout-xlarge/provider_list_fragment.xml5
-rw-r--r--res/layout-xlarge/provider_list_item.xml44
-rw-r--r--res/layout/provider_list_item.xml43
-rw-r--r--src/se/leap/bitmaskclient/ProviderListAdapter.java2
-rw-r--r--src/se/leap/bitmaskclient/ProviderListFragment.java4
7 files changed, 97 insertions, 5 deletions
diff --git a/res/layout-xlarge/configuration_wizard_activity.xml b/res/layout-xlarge/configuration_wizard_activity.xml
index f3d0e48b..bb169e00 100644
--- a/res/layout-xlarge/configuration_wizard_activity.xml
+++ b/res/layout-xlarge/configuration_wizard_activity.xml
@@ -19,6 +19,7 @@
android:fadingEdge="horizontal"
android:singleLine="true"
android:text="@string/configuring_provider"
+ android:textSize="24sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_centerHorizontal="true"
android:textColor="@android:color/holo_blue_bright" />
diff --git a/res/layout-xlarge/provider_detail_fragment.xml b/res/layout-xlarge/provider_detail_fragment.xml
index eb90fad9..4abbaa17 100644
--- a/res/layout-xlarge/provider_detail_fragment.xml
+++ b/res/layout-xlarge/provider_detail_fragment.xml
@@ -12,6 +12,7 @@
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="16dp"
+ android:textSize="32sp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
@@ -23,6 +24,7 @@
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
+ android:textSize="24sp"
android:textStyle="italic"
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -34,6 +36,7 @@
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
+ android:textSize="18sp"
android:textStyle="normal"
android:textAppearance="?android:attr/textAppearanceSmall" />
diff --git a/res/layout-xlarge/provider_list_fragment.xml b/res/layout-xlarge/provider_list_fragment.xml
index 70dbae0d..59dd37d1 100644
--- a/res/layout-xlarge/provider_list_fragment.xml
+++ b/res/layout-xlarge/provider_list_fragment.xml
@@ -2,8 +2,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingLeft="8dp"
- android:paddingRight="8dp" >
+ android:paddingLeft="12dp"
+ android:paddingRight="12dp"
+ android:paddingTop="12dp" >
<ListView
android:id="@id/android:list"
diff --git a/res/layout-xlarge/provider_list_item.xml b/res/layout-xlarge/provider_list_item.xml
new file mode 100644
index 00000000..ec5db117
--- /dev/null
+++ b/res/layout-xlarge/provider_list_item.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/activatedBackgroundIndicator"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:mode="twoLine"
+>
+
+ <TextView android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:layout_marginTop="6dip"
+ android:textSize = "32sp"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ />
+
+ <TextView android:id="@android:id/text2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/text1"
+ android:layout_alignLeft="@android:id/text1"
+ android:textSize = "24sp"
+ />
+
+</TwoLineListItem>
diff --git a/res/layout/provider_list_item.xml b/res/layout/provider_list_item.xml
new file mode 100644
index 00000000..8746f6f8
--- /dev/null
+++ b/res/layout/provider_list_item.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/activatedBackgroundIndicator"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:mode="twoLine"
+>
+
+ <TextView android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:layout_marginTop="6dip"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ />
+
+ <TextView android:id="@android:id/text2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/text1"
+ android:layout_alignLeft="@android:id/text1"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ />
+
+</TwoLineListItem>
diff --git a/src/se/leap/bitmaskclient/ProviderListAdapter.java b/src/se/leap/bitmaskclient/ProviderListAdapter.java
index c5e8b64d..43bba085 100644
--- a/src/se/leap/bitmaskclient/ProviderListAdapter.java
+++ b/src/se/leap/bitmaskclient/ProviderListAdapter.java
@@ -101,7 +101,7 @@ public class ProviderListAdapter<T> extends ArrayAdapter<T> {
int position = getRealPosition(index);
if (convertView == null) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- row = (TwoLineListItem)inflater.inflate(android.R.layout.simple_list_item_2, null);
+ row = (TwoLineListItem)inflater.inflate(R.layout.provider_list_item, null);
} else {
row = (TwoLineListItem)convertView;
}
diff --git a/src/se/leap/bitmaskclient/ProviderListFragment.java b/src/se/leap/bitmaskclient/ProviderListFragment.java
index f35cf739..db414d87 100644
--- a/src/se/leap/bitmaskclient/ProviderListFragment.java
+++ b/src/se/leap/bitmaskclient/ProviderListFragment.java
@@ -94,12 +94,12 @@ public class ProviderListFragment extends ListFragment {
if(getArguments().containsKey(SHOW_ALL_PROVIDERS))
content_adapter = new ProviderListAdapter<ProviderListContent.ProviderItem>(
getActivity(),
- android.R.layout.simple_list_item_activated_2,
+ R.layout.provider_list_item,
ProviderListContent.ITEMS, getArguments().getBoolean(SHOW_ALL_PROVIDERS));
else
content_adapter = new ProviderListAdapter<ProviderListContent.ProviderItem>(
getActivity(),
- android.R.layout.simple_list_item_activated_2,
+ R.layout.provider_list_item,
ProviderListContent.ITEMS);