Clean visual style, part II: extend bright style, convert icons, more touch-ups.
This commit removes the remaining white icons from the previous style,
which was a mix of 'holo dark' (i.e. light) icons and other un-fitting
icons. It's all replaced with theme-colored icons.
The primary color itself had been altered a bit towards green (#18aba1).
Other than the icon replacements, this commit changes:
- tab switcher: fix cosmetic bug in the title bar in <= xhdpi devices
- tab switcher: better incognito presentation
- settings: enable back (<-) arrow
- settings: bold color in the activity (on L and up)
- settings: rationalized launching
- better spacings on the mobile title bar
- better padding on history items
- add proportional padding (1em) to the incognito page
- the incognito tab bar gets a bit darker
- ['Ingnito Page', 'New Incognito Tab'] -> 'Private Browsing'
- 'Page info' -> 'Page information' (no abbrevs when user facing :)
Vast amount of unused resources are removed from the APK.
Change-Id: I4add15fc686495ce27f63e26c2c56c14fa3d6603
diff --git a/src/com/android/browser/BrowserPreferencesPage.java b/src/com/android/browser/BrowserPreferencesPage.java
index 3765452..8f31ef9 100644
--- a/src/com/android/browser/BrowserPreferencesPage.java
+++ b/src/com/android/browser/BrowserPreferencesPage.java
@@ -17,18 +17,40 @@
package com.android.browser;
import android.app.Activity;
+import android.content.Intent;
import android.os.Bundle;
+import android.preference.PreferenceActivity;
import com.android.browser.preferences.GeneralPreferencesFragment;
public class BrowserPreferencesPage extends Activity {
- public static final String CURRENT_PAGE = "currentPage";
+ public static void startPreferencesForResult(Activity callerActivity, String url, int requestCode) {
+ final Intent intent = new Intent(callerActivity, BrowserPreferencesPage.class);
+ intent.putExtra(GeneralPreferencesFragment.EXTRA_CURRENT_PAGE, url);
+ callerActivity.startActivityForResult(intent, requestCode);
+ }
+
+ public static void startPreferenceFragmentForResult(Activity callerActivity, String fragmentName, int requestCode) {
+ final Intent intent = new Intent(callerActivity, BrowserPreferencesPage.class);
+ intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, fragmentName);
+ callerActivity.startActivityForResult(intent, requestCode);
+ }
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+ Intent intent = getIntent();
+ if (intent != null) {
+ String action = intent.getAction();
+ // check if this page was invoked by 'App Data Usage' on the global data monitor
+ if ("android.intent.action.MANAGE_NETWORK_USAGE".equals(action)) {
+ // TODO: switch to the Network fragment here?
+ }
+ }
+
getFragmentManager().beginTransaction().replace(android.R.id.content,
new GeneralPreferencesFragment()).commit();
}