Code formatting
This commit is contained in:
parent
1a1008c70e
commit
bf229f7f05
@ -21,7 +21,7 @@
|
|||||||
<string name="pref_about_title">About IITC Mobile</string>
|
<string name="pref_about_title">About IITC Mobile</string>
|
||||||
<!-- Use CDATA to prevent android from parsing html tags....we are doing this with Html.fromHtml() -->
|
<!-- Use CDATA to prevent android from parsing html tags....we are doing this with Html.fromHtml() -->
|
||||||
<string name="pref_about_msg">
|
<string name="pref_about_msg">
|
||||||
<![CDATA[<big><b>Ingress Intel Total Conversion Mobile</b></big><br><br>
|
<![CDATA[<big><b>Ingress Intel Total Conversion Mobile</b></big><br><br>
|
||||||
<b>by <a href="https://github.com/leCradle">cradle</a> and contributors</b><br><br>
|
<b>by <a href="https://github.com/leCradle">cradle</a> and contributors</b><br><br>
|
||||||
<b>Icon by <a href="http://www.ludolab.net">Giuseppe Lucido</a></b><br><br>
|
<b>Icon by <a href="http://www.ludolab.net">Giuseppe Lucido</a></b><br><br>
|
||||||
IITC Mobile is an optimized mobile browser for the
|
IITC Mobile is an optimized mobile browser for the
|
||||||
|
@ -7,7 +7,7 @@ import android.preference.PreferenceManager;
|
|||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class ActionBarHelper implements OnNavigationListener {
|
public class IITC_ActionBarHelper implements OnNavigationListener {
|
||||||
/*
|
/*
|
||||||
* Show/hide the up arrow on the left end
|
* Show/hide the up arrow on the left end
|
||||||
* getActionBar().setDisplayHomeAsUpEnabled(enabled);
|
* getActionBar().setDisplayHomeAsUpEnabled(enabled);
|
||||||
@ -52,7 +52,7 @@ public class ActionBarHelper implements OnNavigationListener {
|
|||||||
private boolean mHideInFullscreen = false;
|
private boolean mHideInFullscreen = false;
|
||||||
private int mPane = android.R.id.home;
|
private int mPane = android.R.id.home;
|
||||||
|
|
||||||
public ActionBarHelper(IITC_Mobile activity, ActionBar bar) {
|
public IITC_ActionBarHelper(IITC_Mobile activity, ActionBar bar) {
|
||||||
mIitc = activity;
|
mIitc = activity;
|
||||||
mActionBar = bar;
|
mActionBar = bar;
|
||||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(activity);
|
mPrefs = PreferenceManager.getDefaultSharedPreferences(activity);
|
@ -1,10 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile;
|
package com.cradle.iitc_mobile;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONException;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
@ -25,6 +20,11 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import com.cradle.iitc_mobile.share.ShareActivity;
|
import com.cradle.iitc_mobile.share.ShareActivity;
|
||||||
|
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
// provide communication between IITC script and android app
|
// provide communication between IITC script and android app
|
||||||
public class IITC_JSInterface {
|
public class IITC_JSInterface {
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ public class IITC_JSInterface {
|
|||||||
iitcm.runOnUiThread(new Runnable() {
|
iitcm.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ActionBarHelper actionbar = iitcm.getActionBarHelper();
|
IITC_ActionBarHelper actionbar = iitcm.getActionBarHelper();
|
||||||
Integer button = IITC_Mobile.PANES.get(id);
|
Integer button = IITC_Mobile.PANES.get(id);
|
||||||
|
|
||||||
if (button == null)
|
if (button == null)
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile;
|
package com.cradle.iitc_mobile;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import android.app.ActionBar;
|
import android.app.ActionBar;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
@ -35,6 +30,11 @@ import android.webkit.WebView;
|
|||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class IITC_Mobile extends Activity {
|
public class IITC_Mobile extends Activity {
|
||||||
|
|
||||||
private static final int REQUEST_LOGIN = 1;
|
private static final int REQUEST_LOGIN = 1;
|
||||||
@ -54,7 +54,7 @@ public class IITC_Mobile extends Activity {
|
|||||||
private boolean mReloadNeeded = false;
|
private boolean mReloadNeeded = false;
|
||||||
private final ArrayList<String> mDialogStack = new ArrayList<String>();
|
private final ArrayList<String> mDialogStack = new ArrayList<String>();
|
||||||
private SharedPreferences mSharedPrefs;
|
private SharedPreferences mSharedPrefs;
|
||||||
private ActionBarHelper mActionBarHelper;
|
private IITC_ActionBarHelper mActionBarHelper;
|
||||||
|
|
||||||
// Used for custom back stack handling
|
// Used for custom back stack handling
|
||||||
private final ArrayList<Integer> mBackStack = new ArrayList<Integer>();
|
private final ArrayList<Integer> mBackStack = new ArrayList<Integer>();
|
||||||
@ -94,7 +94,7 @@ public class IITC_Mobile extends Activity {
|
|||||||
mIitcWebView = (IITC_WebView) findViewById(R.id.iitc_webview);
|
mIitcWebView = (IITC_WebView) findViewById(R.id.iitc_webview);
|
||||||
|
|
||||||
// pass ActionBar to helper because we deprecated getActionBar
|
// pass ActionBar to helper because we deprecated getActionBar
|
||||||
mActionBarHelper = new ActionBarHelper(this, super.getActionBar());
|
mActionBarHelper = new IITC_ActionBarHelper(this, super.getActionBar());
|
||||||
|
|
||||||
// do something if user changed something in the settings
|
// do something if user changed something in the settings
|
||||||
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
@ -638,7 +638,7 @@ public class IITC_Mobile extends Activity {
|
|||||||
return super.getActionBar();
|
return super.getActionBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionBarHelper getActionBarHelper() {
|
public IITC_ActionBarHelper getActionBarHelper() {
|
||||||
return mActionBarHelper;
|
return mActionBarHelper;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile;
|
package com.cradle.iitc_mobile;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Scanner;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -24,6 +15,15 @@ import android.widget.ArrayAdapter;
|
|||||||
import android.widget.ListAdapter;
|
import android.widget.ListAdapter;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Scanner;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
public class IITC_PluginPreferenceActivity extends PreferenceActivity {
|
public class IITC_PluginPreferenceActivity extends PreferenceActivity {
|
||||||
|
|
||||||
private List<Header> mHeaders;
|
private List<Header> mHeaders;
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile.async;
|
package com.cradle.iitc_mobile.async;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.apache.http.HttpResponse;
|
|
||||||
import org.apache.http.HttpStatus;
|
|
||||||
import org.apache.http.client.HttpClient;
|
|
||||||
import org.apache.http.client.methods.HttpGet;
|
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -17,6 +9,14 @@ import android.util.Log;
|
|||||||
import com.cradle.iitc_mobile.IITC_JSInterface;
|
import com.cradle.iitc_mobile.IITC_JSInterface;
|
||||||
import com.cradle.iitc_mobile.IITC_Mobile;
|
import com.cradle.iitc_mobile.IITC_Mobile;
|
||||||
|
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.apache.http.HttpStatus;
|
||||||
|
import org.apache.http.client.HttpClient;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.impl.client.DefaultHttpClient;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this class parses the http response of a web page.
|
* this class parses the http response of a web page.
|
||||||
* since network operations shouldn't be done on main UI thread
|
* since network operations shouldn't be done on main UI thread
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.cradle.iitc_mobile.share;
|
package com.cradle.iitc_mobile.share;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentPagerAdapter;
|
import android.support.v4.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class IntentFragmentAdapter extends FragmentPagerAdapter {
|
public class IntentFragmentAdapter extends FragmentPagerAdapter {
|
||||||
private List<IntentFragment> mTabs;
|
private List<IntentFragment> mTabs;
|
||||||
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile.share;
|
package com.cradle.iitc_mobile.share;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -24,6 +19,11 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import com.cradle.iitc_mobile.R;
|
import com.cradle.iitc_mobile.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class IntentListView extends ListView {
|
public class IntentListView extends ListView {
|
||||||
private static class CopyHandler extends Pair<String, String> {
|
private static class CopyHandler extends Pair<String, String> {
|
||||||
public CopyHandler(ResolveInfo resolveInfo) {
|
public CopyHandler(ResolveInfo resolveInfo) {
|
||||||
|
@ -7,6 +7,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.cradle.iitc_mobile.R;
|
import com.cradle.iitc_mobile.R;
|
||||||
|
|
||||||
public class SendToClipboard extends Activity {
|
public class SendToClipboard extends Activity {
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
package com.cradle.iitc_mobile.share;
|
package com.cradle.iitc_mobile.share;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import android.app.ActionBar;
|
import android.app.ActionBar;
|
||||||
import android.app.FragmentTransaction;
|
import android.app.FragmentTransaction;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -18,6 +14,10 @@ import android.view.MenuItem;
|
|||||||
|
|
||||||
import com.cradle.iitc_mobile.R;
|
import com.cradle.iitc_mobile.R;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ShareActivity extends FragmentActivity implements ActionBar.TabListener {
|
public class ShareActivity extends FragmentActivity implements ActionBar.TabListener {
|
||||||
private boolean mIsPortal;
|
private boolean mIsPortal;
|
||||||
private String mLl;
|
private String mLl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user