Browse Source

Switch out "Android Search" for better known Ask.com search

master
Anthony Restaino 10 years ago
parent
commit
0a4f650869
  1. BIN
      assets/ask.png
  2. BIN
      res/mipmap-mdpi/ic_launcher.png
  3. 16
      src/acr/browser/lightning/BrowserActivity.java
  4. 2
      src/acr/browser/lightning/Constants.java
  5. 6
      src/acr/browser/lightning/GeneralSettingsActivity.java
  6. 4
      src/acr/browser/lightning/LightningView.java

BIN
assets/ask.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
res/mipmap-mdpi/ic_launcher.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

16
src/acr/browser/lightning/BrowserActivity.java

@ -278,14 +278,11 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl @@ -278,14 +278,11 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
mSearch = (AutoCompleteTextView) mActionBar.getCustomView().findViewById(R.id.search);
mUntitledTitle = (String) this.getString(R.string.untitled);
mDeleteIcon = getResources().getDrawable(R.drawable.ic_action_delete);
mDeleteIcon.setBounds(0, 0, Utils.convertDpToPixels(24),
Utils.convertDpToPixels(24));
mDeleteIcon.setBounds(0, 0, Utils.convertDpToPixels(24), Utils.convertDpToPixels(24));
mRefreshIcon = getResources().getDrawable(R.drawable.ic_action_refresh);
mRefreshIcon.setBounds(0, 0, Utils.convertDpToPixels(24),
Utils.convertDpToPixels(24));
mRefreshIcon.setBounds(0, 0, Utils.convertDpToPixels(24), Utils.convertDpToPixels(24));
mCopyIcon = getResources().getDrawable(R.drawable.ic_action_copy);
mCopyIcon.setBounds(0, 0, Utils.convertDpToPixels(24),
Utils.convertDpToPixels(24));
mCopyIcon.setBounds(0, 0, Utils.convertDpToPixels(24), Utils.convertDpToPixels(24));
mIcon = mRefreshIcon;
SearchClass search = new SearchClass();
mSearch.setCompoundDrawables(null, null, mRefreshIcon, null);
@ -684,10 +681,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl @@ -684,10 +681,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
}
private void setNavigationDrawerWidth() {
int width = getResources().getDisplayMetrics().widthPixels
- Utils.convertDpToPixels(56);
int width = getResources().getDisplayMetrics().widthPixels - Utils.convertDpToPixels(56);
int maxWidth;
if(isTablet()){
if (isTablet()) {
maxWidth = Utils.convertDpToPixels(320);
} else {
maxWidth = Utils.convertDpToPixels(300);
@ -798,7 +794,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl @@ -798,7 +794,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
mSearchText = Constants.GOOGLE_SEARCH;
break;
case 2:
mSearchText = Constants.ANDROID_SEARCH;
mSearchText = Constants.ASK_SEARCH;
break;
case 3:
mSearchText = Constants.BING_SEARCH;

2
src/acr/browser/lightning/Constants.java

@ -20,7 +20,7 @@ public final class Constants { @@ -20,7 +20,7 @@ public final class Constants {
public static final String DUCK_LITE_SEARCH = "https://duckduckgo.com/lite/?t=lightning&q=";
public static final String STARTPAGE_MOBILE_SEARCH = "https://startpage.com/do/m/mobilesearch?language=english&query=";
public static final String STARTPAGE_SEARCH = "https://startpage.com/do/search?language=english&query=";
public static final String ANDROID_SEARCH = "http://www.androidsearchresult.com/search.pg?aff=olb&keyword=";
public static final String ASK_SEARCH = "http://www.ask.com/web?qsrc=0&o=0&l=dir&qo=lightningBrowser&q=";
public static final String HOMEPAGE = "about:home";
public static final String BAIDU_SEARCH = "https://www.baidu.com/s?wd=";
public static final String YANDEX_SEARCH = "https://yandex.ru/yandsearch?lr=21411&text=";

6
src/acr/browser/lightning/GeneralSettingsActivity.java

@ -85,7 +85,7 @@ public class GeneralSettingsActivity extends ActionBarActivity { @@ -85,7 +85,7 @@ public class GeneralSettingsActivity extends ActionBarActivity {
mSearchText.setText("Google");
break;
case 2:
mSearchText.setText("Android Search");
mSearchText.setText("Ask");
break;
case 3:
mSearchText.setText("Bing");
@ -176,7 +176,7 @@ public class GeneralSettingsActivity extends ActionBarActivity { @@ -176,7 +176,7 @@ public class GeneralSettingsActivity extends ActionBarActivity {
AlertDialog.Builder picker = new AlertDialog.Builder(mActivity);
picker.setTitle(getResources().getString(R.string.title_search_engine));
CharSequence[] chars = { getResources().getString(R.string.custom_url), "Google",
"Android Search", "Bing", "Yahoo", "StartPage", "StartPage (Mobile)",
"Ask", "Bing", "Yahoo", "StartPage", "StartPage (Mobile)",
"DuckDuckGo (Privacy)", "DuckDuckGo Lite (Privacy)", "Baidu (Chinese)",
"Yandex (Russian)" };
@ -196,7 +196,7 @@ public class GeneralSettingsActivity extends ActionBarActivity { @@ -196,7 +196,7 @@ public class GeneralSettingsActivity extends ActionBarActivity {
mSearchText.setText("Google");
break;
case 2:
mSearchText.setText("Android Search");
mSearchText.setText("Ask");
break;
case 3:
mSearchText.setText("Bing");

4
src/acr/browser/lightning/LightningView.java

@ -145,9 +145,9 @@ public class LightningView { @@ -145,9 +145,9 @@ public class LightningView {
break;
case 2:
// ANDROID SEARCH;
home = home + "file:///android_asset/lightning.png";
home = home + "file:///android_asset/ask.png";
home = home + HomepageVariables.MIDDLE;
home = home + Constants.ANDROID_SEARCH;
home = home + Constants.ASK_SEARCH;
break;
case 3:
// BING_SEARCH;

Loading…
Cancel
Save