OLD | NEW |
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 package org.mozilla.gecko.toolbar; | 6 package org.mozilla.gecko.toolbar; |
7 | 7 |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.graphics.drawable.Drawable; | 10 import android.graphics.drawable.Drawable; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 return; | 144 return; |
145 } | 145 } |
146 | 146 |
147 // When on tablet show a magnifying glass in editing mode | 147 // When on tablet show a magnifying glass in editing mode |
148 final int searchDrawableId = R.drawable.search_icon_active; | 148 final int searchDrawableId = R.drawable.search_icon_active; |
149 final Drawable searchDrawable; | 149 final Drawable searchDrawable; |
150 if (!isActive) { | 150 if (!isActive) { |
151 searchDrawable = DrawableUtil.tintDrawable(getContext(), searchDrawa
bleId, R.color.placeholder_grey); | 151 searchDrawable = DrawableUtil.tintDrawable(getContext(), searchDrawa
bleId, R.color.placeholder_grey); |
152 } else { | 152 } else { |
153 if (isPrivateMode()) { | 153 if (isPrivateMode()) { |
154 searchDrawable = DrawableUtil.tintDrawable(getContext(), searchD
rawableId, R.color.tabs_tray_icon_grey); | 154 searchDrawable = DrawableUtil.tintDrawable(getContext(), searchD
rawableId, R.color.private_active_text); |
155 } else { | 155 } else { |
156 searchDrawable = getResources().getDrawable(searchDrawableId); | 156 searchDrawable = getResources().getDrawable(searchDrawableId); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 mSearchIcon.setImageDrawable(searchDrawable); | 160 mSearchIcon.setImageDrawable(searchDrawable); |
161 } | 161 } |
162 | 162 |
163 @Override | 163 @Override |
164 public void setOnFocusChangeListener(OnFocusChangeListener listener) { | 164 public void setOnFocusChangeListener(OnFocusChangeListener listener) { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 showKeyboardOnFocus = true; | 337 showKeyboardOnFocus = true; |
338 } | 338 } |
339 } | 339 } |
340 // We can get the SCAN_RESULT_FORMAT, SCAN_RESULT_BYTES, | 340 // We can get the SCAN_RESULT_FORMAT, SCAN_RESULT_BYTES, |
341 // SCAN_RESULT_ORIENTATION and SCAN_RESULT_ERROR_CORRECTION_LEVE
L | 341 // SCAN_RESULT_ORIENTATION and SCAN_RESULT_ERROR_CORRECTION_LEVE
L |
342 // as well as the actual result, which may hold a URL. | 342 // as well as the actual result, which may hold a URL. |
343 } | 343 } |
344 }); | 344 }); |
345 } | 345 } |
346 } | 346 } |
OLD | NEW |