From 96382a82627cad237e8138a5a94f9241347e2bb7 Mon Sep 17 00:00:00 2001
From: Jon Atkins
Date: Sun, 22 Sep 2013 15:52:58 +0100
Subject: [PATCH 1/3] website update for new release
---
website/page/home.php | 4 ++++
website/page/news.php | 3 +++
2 files changed, 7 insertions(+)
diff --git a/website/page/home.php b/website/page/home.php
index 47876d82..e8fd2093 100644
--- a/website/page/home.php
+++ b/website/page/home.php
@@ -15,6 +15,9 @@ offers many more features. It is available for
22nd September 2013
+Update: IITC Mobile 0.6.5 replaces 0.6.4. This fixes a crash on entering plugin preferences on some tablets.
+
+
IITC 0.14.1 and IITC Mobile 0.6.4 have been released. Changes in this version include:
- Better performance when a very large number of portals are within view (country/continent level)
@@ -44,4 +47,5 @@ And plugins:
And, as always, numerous other bug fixes, tweaks and improvements.
+
Older news
diff --git a/website/page/news.php b/website/page/news.php
index 00abaf86..fea95b02 100644
--- a/website/page/news.php
+++ b/website/page/news.php
@@ -2,6 +2,9 @@
22nd September 2013
+Update: IITC Mobile 0.6.5 replaces 0.6.4. This fixes a crash on entering plugin preferences on some tablets.
+
+
IITC 0.14.1 and IITC Mobile 0.6.4 have been released. Changes in this version include:
- Better performance when a very large number of portals are within view (country/continent level)
From 7657d74668495cefcc86b74f6f8a761b17a516c9 Mon Sep 17 00:00:00 2001
From: Philipp Schaefer
Date: Mon, 23 Sep 2013 10:08:48 +0200
Subject: [PATCH 2/3] sort highlighter selection
---
.../cradle/iitc_mobile/IITC_ActionBarHelper.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_ActionBarHelper.java b/mobile/src/com/cradle/iitc_mobile/IITC_ActionBarHelper.java
index 01b6ebe7..6d1ec23f 100644
--- a/mobile/src/com/cradle/iitc_mobile/IITC_ActionBarHelper.java
+++ b/mobile/src/com/cradle/iitc_mobile/IITC_ActionBarHelper.java
@@ -7,6 +7,8 @@ import android.preference.PreferenceManager;
import android.widget.ArrayAdapter;
import android.widget.Toast;
+import java.util.Comparator;
+
public class IITC_ActionBarHelper implements OnNavigationListener {
// Show/hide the up arrow on the very left
// getActionBar().setDisplayHomeAsUpEnabled(enabled);
@@ -21,6 +23,19 @@ public class IITC_ActionBarHelper implements OnNavigationListener {
// getActionBar().setHomeButtonEnabled(enabled);
private class HighlighterAdapter extends ArrayAdapter {
+
+ // Move "No Highlights" on top. Sort the rest alphabetically
+ private class HighlighterComparator implements Comparator {
+ @Override
+ public int compare(String lhs, String rhs) {
+ if (lhs.equals("No Highlights")) return -1000;
+ else if (rhs.equals("No Highlights")) return 1000;
+ else return lhs.compareTo(rhs);
+ }
+ }
+
+ private HighlighterComparator mComparator = new HighlighterComparator();
+
public HighlighterAdapter() {
super(mIitc, android.R.layout.simple_list_item_1);
clear();
@@ -30,6 +45,7 @@ public class IITC_ActionBarHelper implements OnNavigationListener {
public void add(String object) {
super.remove(object); // to avoid duplicates
super.add(object);
+ super.sort(mComparator);
}
@Override
From e06f8f87d95f2a632e0a0410b4147855ee56f802 Mon Sep 17 00:00:00 2001
From: fkloft
Date: Mon, 23 Sep 2013 11:21:23 +0200
Subject: [PATCH 3/3] Change handling of back key
1. quit full screen
2. close drawer
3. close dialogs
4. regular back stack
5. close IITC
dialogs can always be closed via [OK], the drawer still reacts on the left edge
---
.../com/cradle/iitc_mobile/IITC_Mobile.java | 51 +++++++++++--------
.../iitc_mobile/IITC_NavigationHelper.java | 8 +++
2 files changed, 39 insertions(+), 20 deletions(-)
diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
index ed0d646a..22c1fa83 100644
--- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
+++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
@@ -318,7 +318,19 @@ public class IITC_Mobile extends Activity {
// we want a self defined behavior for the back button
@Override
public void onBackPressed() {
- // first kill all open iitc dialogs
+ // exit fullscreen mode if it is enabled and action bar is disabled or the back stack is empty
+ if (mFullscreenMode && (mBackStack.isEmpty() || mNavigationHelper.hideInFullscreen())) {
+ toggleFullscreen();
+ return;
+ }
+
+ // close drawer if opened
+ if (mNavigationHelper.isDrawerOpened()) {
+ mNavigationHelper.closeDrawer();
+ return;
+ }
+
+ // kill all open iitc dialogs
if (!mDialogStack.isEmpty()) {
String id = mDialogStack.pop();
mIitcWebView.loadUrl("javascript: " +
@@ -327,27 +339,26 @@ public class IITC_Mobile extends Activity {
"selector.remove();");
return;
}
- // exit fullscreen mode if it is enabled and action bar is disabled
- // or the back stack is empty
- if (mFullscreenMode && (mBackStack.isEmpty() || mNavigationHelper.hideInFullscreen())) {
- this.toggleFullscreen();
- } else if (!mBackStack.isEmpty()) {
- // Pop last item from backstack and pretend the relevant menu item was clicked
+
+ // Pop last item from backstack and pretend the relevant menu item was clicked
+ if (!mBackStack.isEmpty()) {
backStackPop();
+ return;
+ }
+
+ if (mBackButtonPressed || !mSharedPrefs.getBoolean("pref_press_twice_to_exit", false)) {
+ super.onBackPressed();
+ return;
} else {
- if (mBackButtonPressed || !mSharedPrefs.getBoolean("pref_press_twice_to_exit", false))
- super.onBackPressed();
- else {
- mBackButtonPressed = true;
- Toast.makeText(this, "Press twice to exit", Toast.LENGTH_SHORT).show();
- // reset back button after 2 seconds
- new Handler().postDelayed(new Runnable() {
- @Override
- public void run() {
- mBackButtonPressed = false;
- }
- }, 2000);
- }
+ mBackButtonPressed = true;
+ Toast.makeText(this, "Press twice to exit", Toast.LENGTH_SHORT).show();
+ // reset back button after 2 seconds
+ new Handler().postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ mBackButtonPressed = false;
+ }
+ }, 2000);
}
}
diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java b/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java
index ed3cc325..1d4132f1 100644
--- a/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java
+++ b/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java
@@ -223,6 +223,10 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnNa
updateActionBar();
}
+ public void closeDrawer() {
+ mDrawerLayout.closeDrawers();
+ }
+
public String getPaneTitle(Pane pane)
{
switch (pane) {
@@ -243,6 +247,10 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnNa
}
}
+ public boolean isDrawerOpened() {
+ return mDrawerOpened;
+ }
+
public boolean hideInFullscreen() {
return mHideInFullscreen;
}