Merge branch 'master' into navdrawer-api

Conflicts:
	mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java
This commit is contained in:
fkloft
2013-12-03 23:48:54 +01:00
138 changed files with 130 additions and 139 deletions

View File

@ -369,6 +369,7 @@ public class IITC_Mobile extends Activity implements OnSharedPreferenceChangeLis
// Pop last item from backstack and pretend the relevant menu item was clicked
if (!mBackStack.isEmpty()) {
backStackPop();
mBackButtonPressed = true;
return;
}
@ -404,8 +405,10 @@ public class IITC_Mobile extends Activity implements OnSharedPreferenceChangeLis
// map pane is top-lvl. clear stack.
if (pane == Pane.MAP) mBackStack.clear();
else mBackStack.push(mCurrentPane);
// don't push current pane to backstack if this method was called via back button
else if (!mBackButtonPressed) mBackStack.push(mCurrentPane);
mBackButtonPressed = false;
mCurrentPane = pane;
mNavigationHelper.switchTo(pane);
}

View File

@ -327,13 +327,13 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt
}
public static class Pane {
public static final Pane COMPACT = new Pane("compact", "Compact", R.drawable.collections_view_as_list_compact);
public static final Pane DEBUG = new Pane("debug", "Debug", R.drawable.ic_debug);
public static final Pane FACTION = new Pane("faction", "Faction", R.drawable.social_cc_bcc);
public static final Pane FULL = new Pane("full", "Full", R.drawable.collections_view_as_list);
public static final Pane INFO = new Pane("info", "Info", R.drawable.action_about);
public static final Pane MAP = new Pane("map", "IITC Mobile", R.drawable.location_map);
public static final Pane PUBLIC = new Pane("public", "Public", R.drawable.social_group);
public static final Pane COMPACT = new Pane("compact", "Compact", R.drawable.ic_action_view_as_list_compact);
public static final Pane DEBUG = new Pane("debug", "Debug", R.drawable.ic_action_error);
public static final Pane FACTION = new Pane("faction", "Faction", R.drawable.ic_action_cc_bcc);
public static final Pane FULL = new Pane("full", "Full", R.drawable.ic_action_view_as_list);
public static final Pane INFO = new Pane("info", "Info", R.drawable.ic_action_about);
public static final Pane MAP = new Pane("map", "IITC Mobile", R.drawable.ic_action_map);
public static final Pane PUBLIC = new Pane("public", "Public", R.drawable.ic_action_group);
private int icon;
public String label;

View File

@ -81,10 +81,10 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
String geoUri = "geo:" + mLl;
Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri));
intents.add(geoIntent);
addTab(intents, R.string.tab_map, R.drawable.location_map);
addTab(intents, R.string.tab_map, R.drawable.ic_action_map);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getUrl()));
addTab(intent, R.string.tab_browser, R.drawable.browser);
addTab(intent, R.string.tab_browser, R.drawable.ic_action_web_site);
}
private void setupShareIntent(String str) {
@ -93,7 +93,7 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, str);
intent.putExtra(Intent.EXTRA_SUBJECT, mTitle);
addTab(intent, R.string.tab_share, R.drawable.share);
addTab(intent, R.string.tab_share, R.drawable.ic_action_share);
}
@Override