diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-06-09 15:46:41 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-06-09 15:46:41 -0400 |
| commit | e4b3bda762ab616b2899c8de084e515f01b99c8a (patch) | |
| tree | 67a30dc0c2750f0b364e9a1561e38ecd8537e304 /src/com/android/browser/BrowserActivity.java | |
| parent | 0c905361102172637dbf10b3902fe4c62f9c1d6e (diff) | |
| download | packages_apps_Browser-e4b3bda762ab616b2899c8de084e515f01b99c8a.tar.gz packages_apps_Browser-e4b3bda762ab616b2899c8de084e515f01b99c8a.tar.bz2 packages_apps_Browser-e4b3bda762ab616b2899c8de084e515f01b99c8a.zip | |
Updates to the browser's custom title bar.
Use an asset copied from the Market for the background. Since this background is
dark, change the title's text to white, as well as the dividing line. Changed
the functionality of the buttons on the title bar. Also flipped the title and
the url, and fixed a bug where "Loading..." remained for too long. Also added
the drop shadow below the title bar.
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
| -rw-r--r-- | src/com/android/browser/BrowserActivity.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 15e07f787..1966b8b5d 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -650,7 +650,6 @@ public class BrowserActivity extends Activity super.onCreate(icicle); if (CUSTOM_BROWSER_BAR) { this.requestWindowFeature(Window.FEATURE_NO_TITLE); - mTitleBar = new TitleBar(this); } else { this.requestWindowFeature(Window.FEATURE_LEFT_ICON); this.requestWindowFeature(Window.FEATURE_RIGHT_ICON); @@ -687,18 +686,14 @@ public class BrowserActivity extends Activity FrameLayout frameLayout = (FrameLayout) getWindow().getDecorView() .findViewById(com.android.internal.R.id.content); if (CUSTOM_BROWSER_BAR) { - mContentView = new FrameLayout(this); // This LinearLayout will hold the title bar and a FrameLayout, which // holds everything else. - LinearLayout linearLayout = new LinearLayout(this); - linearLayout.setOrientation(LinearLayout.VERTICAL); - linearLayout.addView(mTitleBar, new LinearLayout.LayoutParams( - ViewGroup.LayoutParams.FILL_PARENT, - ViewGroup.LayoutParams.WRAP_CONTENT)); - linearLayout.addView(mContentView, new LinearLayout.LayoutParams( - ViewGroup.LayoutParams.FILL_PARENT, - ViewGroup.LayoutParams.FILL_PARENT)); - + LinearLayout linearLayout = (LinearLayout) LayoutInflater.from(this) + .inflate(R.layout.custom_screen, null); + mTitleBar = (TitleBar) linearLayout.findViewById(R.id.title_bar); + mTitleBar.setBrowserActivity(this); + mContentView = (FrameLayout) linearLayout.findViewById( + R.id.main_content); frameLayout.addView(linearLayout, COVER_SCREEN_PARAMS); } else { mContentView = frameLayout; @@ -4627,7 +4622,7 @@ public class BrowserActivity extends Activity mMenuState = EMPTY_MENU; } - private void bookmarksOrHistoryPicker(boolean startWithHistory) { + /* package */ void bookmarksOrHistoryPicker(boolean startWithHistory) { WebView current = mTabControl.getCurrentWebView(); if (current == null) { return; |
