OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 package org.mozilla.search; | 5 package org.mozilla.search; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.database.Cursor; | 8 import android.database.Cursor; |
9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
10 import android.net.Uri; | 10 import android.net.Uri; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 private void updateUiFromCursor(Cursor c) { | 176 private void updateUiFromCursor(Cursor c) { |
177 if (c != null && c.getCount() > 0) { | 177 if (c != null && c.getCount() > 0) { |
178 return; | 178 return; |
179 } | 179 } |
180 | 180 |
181 if (emptyView == null) { | 181 if (emptyView == null) { |
182 final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.i
d.empty_view_stub); | 182 final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.i
d.empty_view_stub); |
183 emptyView = emptyViewStub.inflate(); | 183 emptyView = emptyViewStub.inflate(); |
184 | 184 |
185 ((ImageView) emptyView.findViewById(R.id.empty_image)).setImageResou
rce(R.drawable.icon_search_empty_firefox); | 185 // Changed icon. See https://issues.adblockplus.org/ticket/2606 |
| 186 ((ImageView) emptyView.findViewById(R.id.empty_image)).setImageResou
rce(R.drawable.abb_icon_search_empty); |
186 ((TextView) emptyView.findViewById(R.id.empty_title)).setText(R.stri
ng.search_empty_title); | 187 ((TextView) emptyView.findViewById(R.id.empty_title)).setText(R.stri
ng.search_empty_title); |
187 ((TextView) emptyView.findViewById(R.id.empty_message)).setText(R.st
ring.search_empty_message); | 188 ((TextView) emptyView.findViewById(R.id.empty_message)).setText(R.st
ring.search_empty_message); |
188 | 189 |
189 listView.setEmptyView(emptyView); | 190 listView.setEmptyView(emptyView); |
190 } | 191 } |
191 } | 192 } |
192 | 193 |
193 private class SearchHistoryLoaderCallbacks implements LoaderManager.LoaderCa
llbacks<Cursor> { | 194 private class SearchHistoryLoaderCallbacks implements LoaderManager.LoaderCa
llbacks<Cursor> { |
194 @Override | 195 @Override |
195 public Loader<Cursor> onCreateLoader(int id, Bundle args) { | 196 public Loader<Cursor> onCreateLoader(int id, Bundle args) { |
(...skipping 10 matching lines...) Expand all Loading... |
206 } | 207 } |
207 | 208 |
208 @Override | 209 @Override |
209 public void onLoaderReset(Loader<Cursor> loader) { | 210 public void onLoaderReset(Loader<Cursor> loader) { |
210 if (cursorAdapter != null) { | 211 if (cursorAdapter != null) { |
211 cursorAdapter.swapCursor(null); | 212 cursorAdapter.swapCursor(null); |
212 } | 213 } |
213 } | 214 } |
214 } | 215 } |
215 } | 216 } |
OLD | NEW |