summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-08-01 10:35:35 +0200
committerParménides GV <parmegv@sdf.org>2013-10-04 10:39:13 +0200
commit661ecd222336fe939d0af095e2f489b6c363d6bc (patch)
tree502be0acb1734f93adc8ac816766e31b44544495
parentaa8b01b7a4330447497fdcc926e73cd3bf9394ad (diff)
ConfigurationWizard uses action instead of button.
New provider button has been converted to an action item, shown at the bottom of the screen.
-rw-r--r--AndroidManifest.xml3
-rw-r--r--res/drawable-hdpi/ic_menu_add.pngbin0 -> 2194 bytes
-rw-r--r--res/drawable-ldpi/ic_menu_add.pngbin0 -> 1580 bytes
-rwxr-xr-xres/drawable-mdpi/ic_menu_add.pngbin0 -> 1339 bytes
-rw-r--r--res/drawable-xhdpi/ic_menu_add.pngbin0 -> 3061 bytes
-rw-r--r--res/layout/provider_list_fragment.xml9
-rw-r--r--res/menu/configuration_wizard_activity.xml7
-rw-r--r--src/se/leap/leapclient/ConfigurationWizard.java5
8 files changed, 13 insertions, 11 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8f51729a..4ac3ad58 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -152,7 +152,8 @@
</activity>
<activity
android:name="se.leap.leapclient.ConfigurationWizard"
- android:label="@string/title_activity_configuration_wizard" >
+ android:label="@string/title_activity_configuration_wizard"
+ android:uiOptions="splitActionBarWhenNarrow" >
</activity>
<service android:name=".EIP" android:exported="false">
diff --git a/res/drawable-hdpi/ic_menu_add.png b/res/drawable-hdpi/ic_menu_add.png
new file mode 100644
index 00000000..444e8a5e
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_add.png
Binary files differ
diff --git a/res/drawable-ldpi/ic_menu_add.png b/res/drawable-ldpi/ic_menu_add.png
new file mode 100644
index 00000000..89620af8
--- /dev/null
+++ b/res/drawable-ldpi/ic_menu_add.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add.png b/res/drawable-mdpi/ic_menu_add.png
new file mode 100755
index 00000000..361c7c46
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_add.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add.png b/res/drawable-xhdpi/ic_menu_add.png
new file mode 100644
index 00000000..7d498a96
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_add.png
Binary files differ
diff --git a/res/layout/provider_list_fragment.xml b/res/layout/provider_list_fragment.xml
index 0db0734b..5a6770c8 100644
--- a/res/layout/provider_list_fragment.xml
+++ b/res/layout/provider_list_fragment.xml
@@ -8,15 +8,8 @@
<ListView
android:id="@id/android:list"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="0dip"
android:layout_weight="1"
- android:layout_alignParentTop="true"
android:drawSelectorOnTop="false" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="addAndSelectNewProvider"
- android:text="@string/new_provider_button" />
-
</LinearLayout>
diff --git a/res/menu/configuration_wizard_activity.xml b/res/menu/configuration_wizard_activity.xml
index 9e441a18..9936b6dc 100644
--- a/res/menu/configuration_wizard_activity.xml
+++ b/res/menu/configuration_wizard_activity.xml
@@ -5,4 +5,11 @@
android:orderInCategory="110"
android:title="@string/about"/>
+ <item
+ android:id="@+id/new_provider"
+ android:orderInCategory="210"
+ android:title="@string/new_provider_button"
+ android:showAsAction="ifRoom|withText"
+ android:icon="@drawable/ic_menu_add"
+ />
</menu> \ No newline at end of file
diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java
index dd9f4121..c316a18c 100644
--- a/src/se/leap/leapclient/ConfigurationWizard.java
+++ b/src/se/leap/leapclient/ConfigurationWizard.java
@@ -301,9 +301,8 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
/**
* Open the new provider dialog
- * @param view from which the dialog is showed
*/
- public void addAndSelectNewProvider(View view) {
+ public void addAndSelectNewProvider() {
FragmentTransaction fragment_transaction = getFragmentManager().beginTransaction();
Fragment previous_new_provider_dialog = getFragmentManager().findFragmentByTag(NewProviderDialog.TAG);
if (previous_new_provider_dialog != null) {
@@ -380,6 +379,8 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
switch (item.getItemId()){
case R.id.about_leap:
showAboutFragment(getCurrentFocus());
+ case R.id.new_provider:
+ addAndSelectNewProvider();
default:
return super.onOptionsItemSelected(item);
}