Switch out "Android Search" for better known Ask.com search
This commit is contained in:
parent
32f4a457bb
commit
0a4f650869
BIN
assets/ask.png
Normal file
BIN
assets/ask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
@ -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
|
||||
}
|
||||
|
||||
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
|
||||
mSearchText = Constants.GOOGLE_SEARCH;
|
||||
break;
|
||||
case 2:
|
||||
mSearchText = Constants.ANDROID_SEARCH;
|
||||
mSearchText = Constants.ASK_SEARCH;
|
||||
break;
|
||||
case 3:
|
||||
mSearchText = Constants.BING_SEARCH;
|
||||
|
@ -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=";
|
||||
@ -28,9 +28,9 @@ public final class Constants {
|
||||
.toString();
|
||||
public static final String JAVASCRIPT_INVERT_PAGE = "javascript:(function(){var e='img {-webkit-filter: invert(100%);'+'-moz-filter: invert(100%);'+'-o-filter: invert(100%);'+'-ms-filter: invert(100%); }',t=document.getElementsByTagName('head')[0],n=document.createElement('style');if(!window.counter){window.counter=1}else{window.counter++;if(window.counter%2==0){var e='html {-webkit-filter: invert(0%); -moz-filter: invert(0%); -o-filter: invert(0%); -ms-filter: invert(0%); }'}}n.type='text/css';if(n.styleSheet){n.styleSheet.cssText=e}else{n.appendChild(document.createTextNode(e))}t.appendChild(n)})();";
|
||||
public static final String JAVASCRIPT_TEXT_REFLOW = "javascript:document.getElementsByTagName('body')[0].style.width=window.innerWidth+'px';";
|
||||
|
||||
|
||||
public static final String LOAD_READING_URL = "ReadingUrl";
|
||||
|
||||
|
||||
public static final String SEPARATOR = "\\|\\$\\|SEPARATOR\\|\\$\\|";
|
||||
public static final String HTTP = "http://";
|
||||
public static final String HTTPS = "https://";
|
||||
|
@ -48,10 +48,10 @@ public class GeneralSettingsActivity extends ActionBarActivity {
|
||||
setContentView(R.layout.general_settings);
|
||||
|
||||
// set up ActionBar
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
||||
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {
|
||||
@ -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 {
|
||||
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 {
|
||||
mSearchText.setText("Google");
|
||||
break;
|
||||
case 2:
|
||||
mSearchText.setText("Android Search");
|
||||
mSearchText.setText("Ask");
|
||||
break;
|
||||
case 3:
|
||||
mSearchText.setText("Bing");
|
||||
|
@ -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…
x
Reference in New Issue
Block a user