Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion
This commit is contained in:
commit
0c6629c6ed
@ -1,10 +1,17 @@
|
|||||||
// created to start cleaning up "window" interaction
|
// created to start cleaning up "window" interaction
|
||||||
//
|
//
|
||||||
window.show = function(id) {
|
window.show = function(id) {
|
||||||
window.hideall();
|
|
||||||
if (typeof android !== 'undefined' && android && android.switchToPane) {
|
if (typeof android !== 'undefined' && android && android.switchToPane) {
|
||||||
android.switchToPane(id);
|
android.switchToPane(id);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* disable all map properties when switching to another pane
|
||||||
|
* because sometimes (bug?) touch events are passed to the map when
|
||||||
|
* other panes are focussed
|
||||||
|
*/
|
||||||
|
window.disableMapProperties();
|
||||||
|
window.hideall();
|
||||||
|
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 'full':
|
case 'full':
|
||||||
window.chat.show('full');
|
window.chat.show('full');
|
||||||
@ -22,6 +29,7 @@ window.show = function(id) {
|
|||||||
window.debug.console.show();
|
window.debug.console.show();
|
||||||
break;
|
break;
|
||||||
case 'map':
|
case 'map':
|
||||||
|
window.enableMapProperties();
|
||||||
window.smartphone.mapButton.click();
|
window.smartphone.mapButton.click();
|
||||||
$('#portal_highlight_select').show();
|
$('#portal_highlight_select').show();
|
||||||
$('#farm_level_select').show();
|
$('#farm_level_select').show();
|
||||||
@ -35,8 +43,23 @@ window.show = function(id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.enableMapProperties = function() {
|
||||||
|
window.map.tap.enable();
|
||||||
|
window.map.dragging.enable();
|
||||||
|
window.map.touchZoom.enable();
|
||||||
|
window.map.doubleClickZoom.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
window.disableMapProperties = function() {
|
||||||
|
window.map.tap.disable();
|
||||||
|
window.map.dragging.disable();
|
||||||
|
window.map.touchZoom.disable();
|
||||||
|
window.map.doubleClickZoom.disable();
|
||||||
|
}
|
||||||
|
|
||||||
window.hideall = function() {
|
window.hideall = function() {
|
||||||
$('#chatcontrols, #chat, #chatinput, #sidebartoggle, #scrollwrapper, #updatestatus, #portal_highlight_select').hide();
|
$('#chatcontrols, #chat, #chatinput, #sidebartoggle, #scrollwrapper, #updatestatus, #portal_highlight_select').hide();
|
||||||
$('#farm_level_select').hide();
|
$('#farm_level_select').hide();
|
||||||
$('#map').css('visibility', 'hidden');
|
$('#map').css('visibility', 'hidden');
|
||||||
|
$('.ui-tooltip').remove();
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.cradle.iitc_mobile"
|
package="com.cradle.iitc_mobile"
|
||||||
android:versionCode="54"
|
android:versionCode="55"
|
||||||
android:versionName="0.7.4">
|
android:versionName="0.7.5">
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="14"
|
android:minSdkVersion="14"
|
||||||
|
@ -103,7 +103,6 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
mFragmentAdapter = new IntentFragmentAdapter(getSupportFragmentManager());
|
mFragmentAdapter = new IntentFragmentAdapter(getSupportFragmentManager());
|
||||||
|
|
||||||
final ActionBar actionBar = getActionBar();
|
final ActionBar actionBar = getActionBar();
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
@ -126,7 +125,8 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
actionBar.setSelectedNavigationItem(position);
|
if (actionBar.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD)
|
||||||
|
actionBar.setSelectedNavigationItem(position);
|
||||||
setSelected(position);
|
setSelected(position);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -141,11 +141,15 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
.setTabListener(this));
|
.setTabListener(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mFragmentAdapter.getCount() > 1)
|
||||||
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
|
|
||||||
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
|
int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
|
||||||
if (selected < mFragmentAdapter.getCount()) {
|
if (selected < mFragmentAdapter.getCount()) {
|
||||||
mViewPager.setCurrentItem(selected);
|
mViewPager.setCurrentItem(selected);
|
||||||
actionBar.setSelectedNavigationItem(selected);
|
if (actionBar.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD)
|
||||||
|
actionBar.setSelectedNavigationItem(selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user