Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: mobile/android/base/home/PanelLayout.java

Issue 29341383: Issue 2606 - Firefox logo shown in background on empty Adblock Browser New Tab and Search pages (Closed)
Left Patch Set: Adding change comments Created Nov. 2, 2016, 10:47 a.m.
Right Patch Set: Adjustments in comments Created Nov. 21, 2016, 12:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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.home; 6 package org.mozilla.gecko.home;
7 7
8 import org.mozilla.gecko.R; 8 import org.mozilla.gecko.R;
9 import org.mozilla.gecko.db.BrowserContract.HomeItems; 9 import org.mozilla.gecko.db.BrowserContract.HomeItems;
10 import org.mozilla.gecko.home.HomePager.OnUrlOpenListener; 10 import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 final TextView textView = (TextView) view.findViewById(R.id.home_emp ty_text); 452 final TextView textView = (TextView) view.findViewById(R.id.home_emp ty_text);
453 if (TextUtils.isEmpty(text)) { 453 if (TextUtils.isEmpty(text)) {
454 textView.setText(R.string.home_default_empty); 454 textView.setText(R.string.home_default_empty);
455 } else { 455 } else {
456 textView.setText(text); 456 textView.setText(text);
457 } 457 }
458 458
459 final String imageUrl = (emptyViewConfig == null) ? null : emptyView Config.getImageUrl(); 459 final String imageUrl = (emptyViewConfig == null) ? null : emptyView Config.getImageUrl();
460 final ImageView imageView = (ImageView) view.findViewById(R.id.home_ empty_image); 460 final ImageView imageView = (ImageView) view.findViewById(R.id.home_ empty_image);
461 461
462 // Changed icon. See https://issues.adblockplus.org/ticket/2606
462 if (TextUtils.isEmpty(imageUrl)) { 463 if (TextUtils.isEmpty(imageUrl)) {
463 // Changed icon. See https://issues.adblockplus.org/ticket/2606
Felix Dahlke 2016/11/17 18:38:51 Nit: I guess it would suffice to have this comment
464 imageView.setImageResource(R.drawable.abb_icon_home_empty); 464 imageView.setImageResource(R.drawable.abb_icon_home_empty);
465 } else { 465 } else {
466 // Changed icon. See https://issues.adblockplus.org/ticket/2606
467 ImageLoader.with(getContext()) 466 ImageLoader.with(getContext())
468 .load(imageUrl) 467 .load(imageUrl)
469 .error(R.drawable.abb_icon_home_empty) 468 .error(R.drawable.abb_icon_home_empty)
470 .into(imageView); 469 .into(imageView);
471 } 470 }
472 471
473 viewState.setEmptyView(view); 472 viewState.setEmptyView(view);
474 } 473 }
475 474
476 return view; 475 return view;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 public boolean canGoBack() { 739 public boolean canGoBack() {
741 return mViewState.canPopFilter(); 740 return mViewState.canPopFilter();
742 } 741 }
743 742
744 @Override 743 @Override
745 public void goBack() { 744 public void goBack() {
746 popFilterOnView(mViewState); 745 popFilterOnView(mViewState);
747 } 746 }
748 } 747 }
749 } 748 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld