Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.browser; |
| 18 | |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 19 | import com.android.browser.UrlInputView.UrlInputListener; |
| 20 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 21 | import android.app.Activity; |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 22 | import android.app.SearchManager; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 23 | import android.content.Context; |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 24 | import android.content.Intent; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 25 | import android.content.res.Resources; |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 26 | import android.graphics.Bitmap; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 27 | import android.graphics.drawable.Drawable; |
Michael Kolb | 1ce7813 | 2010-09-23 15:50:53 -0700 | [diff] [blame] | 28 | import android.text.TextUtils; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 29 | import android.view.ContextMenu; |
| 30 | import android.view.LayoutInflater; |
| 31 | import android.view.MenuInflater; |
| 32 | import android.view.View; |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 33 | import android.view.View.OnClickListener; |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 34 | import android.view.View.OnFocusChangeListener; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 35 | import android.widget.ImageView; |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 36 | import android.widget.TextView; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 37 | |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 38 | /** |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 39 | * tabbed title bar for xlarge screen browser |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 40 | */ |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 41 | public class TitleBarXLarge extends TitleBarBase |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 42 | implements UrlInputListener, OnClickListener, OnFocusChangeListener { |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 43 | |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 44 | private static final int PROGRESS_MAX = 100; |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 45 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 46 | private Activity mActivity; |
| 47 | private UiController mUiController; |
| 48 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 49 | private Drawable mStopDrawable; |
| 50 | private Drawable mReloadDrawable; |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 51 | |
Michael Kolb | 3f65c38 | 2010-08-20 15:31:16 -0700 | [diff] [blame] | 52 | private View mContainer; |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 53 | private View mBackButton; |
| 54 | private View mForwardButton; |
| 55 | private View mStar; |
| 56 | private View mSearchButton; |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 57 | private View mFocusContainer; |
| 58 | private View mUnfocusContainer; |
| 59 | private View mGoButton; |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 60 | private ImageView mStopButton; |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 61 | private View mAllButton; |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 62 | private View mClearButton; |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 63 | private PageProgressView mProgressView; |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 64 | private UrlInputView mUrlFocused; |
| 65 | private TextView mUrlUnfocused; |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 66 | private boolean mInLoad; |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 67 | |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 68 | public TitleBarXLarge(Activity activity, UiController controller) { |
| 69 | super(activity); |
| 70 | mActivity = activity; |
| 71 | mUiController = controller; |
| 72 | Resources resources = activity.getResources(); |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 73 | mStopDrawable = resources.getDrawable(R.drawable.ic_stop_normal); |
| 74 | mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_normal); |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 75 | rebuildLayout(activity, true); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 76 | } |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 77 | |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 78 | private void rebuildLayout(Context context, boolean rebuildData) { |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 79 | LayoutInflater factory = LayoutInflater.from(context); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 80 | factory.inflate(R.layout.url_bar, this); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 81 | |
Michael Kolb | 3f65c38 | 2010-08-20 15:31:16 -0700 | [diff] [blame] | 82 | mContainer = findViewById(R.id.taburlbar); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 83 | mUrlFocused = (UrlInputView) findViewById(R.id.url_focused); |
| 84 | mUrlUnfocused = (TextView) findViewById(R.id.url_unfocused); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 85 | mAllButton = findViewById(R.id.all_btn); |
| 86 | // TODO: Change enabled states based on whether you can go |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 87 | // back/forward. Probably should be done inside onPageStarted. |
| 88 | mBackButton = findViewById(R.id.back); |
| 89 | mForwardButton = findViewById(R.id.forward); |
| 90 | mStar = findViewById(R.id.star); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 91 | mStopButton = (ImageView) findViewById(R.id.stop); |
| 92 | mSearchButton = findViewById(R.id.search); |
| 93 | mLockIcon = (ImageView) findViewById(R.id.lock); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 94 | mGoButton = findViewById(R.id.go); |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 95 | mClearButton = findViewById(R.id.clear); |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 96 | mProgressView = (PageProgressView) findViewById(R.id.progress); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 97 | mFocusContainer = findViewById(R.id.urlbar_focused); |
| 98 | mUnfocusContainer = findViewById(R.id.urlbar_unfocused); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 99 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 100 | mBackButton.setOnClickListener(this); |
| 101 | mForwardButton.setOnClickListener(this); |
| 102 | mStar.setOnClickListener(this); |
| 103 | mAllButton.setOnClickListener(this); |
| 104 | mStopButton.setOnClickListener(this); |
| 105 | mSearchButton.setOnClickListener(this); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 106 | mGoButton.setOnClickListener(this); |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 107 | mClearButton.setOnClickListener(this); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 108 | mUrlFocused.setUrlInputListener(this); |
| 109 | mUrlUnfocused.setOnFocusChangeListener(this); |
Michael Kolb | 21ce4d2 | 2010-09-15 14:55:05 -0700 | [diff] [blame] | 110 | mUrlFocused.setContainer(mFocusContainer); |
Michael Kolb | 0506f2d | 2010-10-14 16:20:16 -0700 | [diff] [blame] | 111 | mUnfocusContainer.setOnClickListener(this); |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 112 | } |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 113 | |
Michael Kolb | c7485ae | 2010-09-03 10:10:58 -0700 | [diff] [blame] | 114 | public void onFocusChange(View v, boolean hasFocus) { |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 115 | if (hasFocus) { |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 116 | setUrlMode(true); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 117 | mUrlFocused.selectAll(); |
| 118 | mUrlFocused.requestFocus(); |
| 119 | mUrlFocused.setDropDownWidth(mUnfocusContainer.getWidth()); |
| 120 | mUrlFocused.setDropDownHorizontalOffset(-mUrlFocused.getLeft()); |
| 121 | } |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 122 | } |
| 123 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 124 | @Override |
| 125 | public void onClick(View v) { |
Michael Kolb | 0506f2d | 2010-10-14 16:20:16 -0700 | [diff] [blame] | 126 | if (mUnfocusContainer == v) { |
| 127 | mUrlUnfocused.requestFocus(); |
| 128 | } else if (mBackButton == v) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 129 | mUiController.getCurrentTopWebView().goBack(); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 130 | } else if (mForwardButton == v) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 131 | mUiController.getCurrentTopWebView().goForward(); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 132 | } else if (mStar == v) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 133 | mUiController.bookmarkCurrentPage( |
Leon Scroggins | 88d0803 | 2010-10-21 15:17:10 -0400 | [diff] [blame] | 134 | AddBookmarkPage.DEFAULT_FOLDER_ID); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 135 | } else if (mAllButton == v) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 136 | mUiController.bookmarksOrHistoryPicker(false); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 137 | } else if (mSearchButton == v) { |
| 138 | search(); |
| 139 | } else if (mStopButton == v) { |
| 140 | stopOrRefresh(); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 141 | } else if (mGoButton == v) { |
Michael Kolb | 1ce7813 | 2010-09-23 15:50:53 -0700 | [diff] [blame] | 142 | if (!TextUtils.isEmpty(mUrlFocused.getText())) { |
John Reck | 40f720e | 2010-11-10 11:57:04 -0800 | [diff] [blame] | 143 | onAction(mUrlFocused.getText().toString(), null); |
Michael Kolb | 1ce7813 | 2010-09-23 15:50:53 -0700 | [diff] [blame] | 144 | } |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 145 | } else if (mClearButton == v) { |
| 146 | mUrlFocused.setText(""); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 147 | } |
| 148 | } |
| 149 | |
Michael Kolb | 3f65c38 | 2010-08-20 15:31:16 -0700 | [diff] [blame] | 150 | int getHeightWithoutProgress() { |
| 151 | return mContainer.getHeight(); |
| 152 | } |
| 153 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 154 | @Override |
| 155 | void setFavicon(Bitmap icon) { } |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 156 | |
| 157 | // UrlInputListener implementation |
| 158 | |
| 159 | @Override |
John Reck | 40f720e | 2010-11-10 11:57:04 -0800 | [diff] [blame] | 160 | public void onAction(String text, String extra) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 161 | mUiController.getCurrentTopWebView().requestFocus(); |
| 162 | ((BaseUi) mUiController.getUi()).hideFakeTitleBar(); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 163 | Intent i = new Intent(); |
| 164 | i.setAction(Intent.ACTION_SEARCH); |
| 165 | i.putExtra(SearchManager.QUERY, text); |
John Reck | 40f720e | 2010-11-10 11:57:04 -0800 | [diff] [blame] | 166 | if (extra != null) { |
| 167 | i.putExtra(SearchManager.EXTRA_DATA_KEY, extra); |
| 168 | } |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 169 | mUiController.handleNewIntent(i); |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 170 | setUrlMode(false); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 171 | setDisplayTitle(text); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | @Override |
| 175 | public void onDismiss() { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 176 | mUiController.getCurrentTopWebView().requestFocus(); |
| 177 | ((BaseUi) mUiController.getUi()).hideFakeTitleBar(); |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 178 | setUrlMode(false); |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 179 | setDisplayTitle(mUiController.getCurrentWebView().getUrl()); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | @Override |
| 183 | public void onEdit(String text) { |
Michael Kolb | 7b20ddd | 2010-10-14 15:03:28 -0700 | [diff] [blame] | 184 | setDisplayTitle(text, true); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 185 | if (text != null) { |
| 186 | mUrlFocused.setSelection(text.length()); |
| 187 | } |
| 188 | } |
| 189 | |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 190 | private void setUrlMode(boolean focused) { |
| 191 | swapUrlContainer(focused); |
| 192 | if (focused) { |
| 193 | mSearchButton.setVisibility(View.GONE); |
| 194 | mGoButton.setVisibility(View.VISIBLE); |
| 195 | } else { |
| 196 | mSearchButton.setVisibility(View.VISIBLE); |
| 197 | mGoButton.setVisibility(View.GONE); |
| 198 | } |
| 199 | } |
| 200 | |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 201 | private void swapUrlContainer(boolean focus) { |
| 202 | mUnfocusContainer.setVisibility(focus ? View.GONE : View.VISIBLE); |
| 203 | mFocusContainer.setVisibility(focus ? View.VISIBLE : View.GONE); |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | @Override |
| 207 | public void createContextMenu(ContextMenu menu) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 208 | MenuInflater inflater = mActivity.getMenuInflater(); |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 209 | inflater.inflate(R.menu.title_context, menu); |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 210 | mActivity.onCreateContextMenu(menu, this, null); |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 211 | } |
| 212 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 213 | private void search() { |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 214 | setDisplayTitle(""); |
| 215 | mUrlUnfocused.requestFocus(); |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 216 | } |
| 217 | |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 218 | private void stopOrRefresh() { |
| 219 | if (mInLoad) { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 220 | mUiController.stopLoading(); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 221 | } else { |
Michael Kolb | 8233fac | 2010-10-26 16:08:53 -0700 | [diff] [blame] | 222 | mUiController.getCurrentTopWebView().reload(); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 223 | } |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | /** |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 227 | * Update the progress, from 0 to 100. |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 228 | */ |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 229 | @Override |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 230 | void setProgress(int newProgress) { |
| 231 | if (newProgress >= PROGRESS_MAX) { |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 232 | mProgressView.setProgress(PageProgressView.MAX_PROGRESS); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 233 | mProgressView.setVisibility(View.GONE); |
| 234 | mInLoad = false; |
| 235 | mStopButton.setImageDrawable(mReloadDrawable); |
| 236 | } else { |
| 237 | if (!mInLoad) { |
| 238 | mProgressView.setVisibility(View.VISIBLE); |
| 239 | mInLoad = true; |
| 240 | mStopButton.setImageDrawable(mStopDrawable); |
| 241 | } |
Michael Kolb | b7b115e | 2010-09-25 16:59:37 -0700 | [diff] [blame] | 242 | mProgressView.setProgress(newProgress * PageProgressView.MAX_PROGRESS |
| 243 | / PROGRESS_MAX); |
Michael Kolb | a2b2ba8 | 2010-08-04 17:54:03 -0700 | [diff] [blame] | 244 | } |
Michael Kolb | fe25199 | 2010-07-08 15:41:55 -0700 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | @Override |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 248 | /* package */ void setDisplayTitle(String title) { |
Michael Kolb | 21ce4d2 | 2010-09-15 14:55:05 -0700 | [diff] [blame] | 249 | mUrlFocused.setText(title, false); |
Michael Kolb | 513286f | 2010-09-09 12:55:12 -0700 | [diff] [blame] | 250 | mUrlUnfocused.setText(title); |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 251 | } |
| 252 | |
Michael Kolb | 7b20ddd | 2010-10-14 15:03:28 -0700 | [diff] [blame] | 253 | void setDisplayTitle(String title, boolean filter) { |
| 254 | mUrlFocused.setText(title, filter); |
| 255 | mUrlUnfocused.setText(title); |
| 256 | } |
| 257 | |
Leon Scroggins | 571b376 | 2010-05-26 10:25:01 -0400 | [diff] [blame] | 258 | } |