LEFT | RIGHT |
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.GeckoAppShell; | 8 import org.mozilla.gecko.GeckoAppShell; |
9 import org.mozilla.gecko.GeckoEvent; | 9 import org.mozilla.gecko.GeckoEvent; |
10 import org.mozilla.gecko.R; | 10 import org.mozilla.gecko.R; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 @Override | 46 @Override |
47 public void onClick(View v) { | 47 public void onClick(View v) { |
48 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("
HomePanels:Authenticate", panelId)); | 48 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("
HomePanels:Authenticate", panelId)); |
49 } | 49 } |
50 }); | 50 }); |
51 | 51 |
52 final ImageView imageView = (ImageView) findViewById(R.id.image); | 52 final ImageView imageView = (ImageView) findViewById(R.id.image); |
53 final String imageUrl = authConfig.getImageUrl(); | 53 final String imageUrl = authConfig.getImageUrl(); |
54 | 54 |
55 if (TextUtils.isEmpty(imageUrl)) { | 55 if (TextUtils.isEmpty(imageUrl)) { |
| 56 // Use a default image if an image URL isn't specified. |
56 // Changed icon. See https://issues.adblockplus.org/ticket/2606 | 57 // Changed icon. See https://issues.adblockplus.org/ticket/2606 |
57 // Use a default image if an image URL isn't specified. | |
58 imageView.setImageResource(R.drawable.abb_icon_home_empty); | 58 imageView.setImageResource(R.drawable.abb_icon_home_empty); |
59 } else { | 59 } else { |
60 ImageLoader.with(getContext()) | 60 ImageLoader.with(getContext()) |
61 .load(imageUrl) | 61 .load(imageUrl) |
62 .into(imageView); | 62 .into(imageView); |
63 } | 63 } |
64 } | 64 } |
65 } | 65 } |
LEFT | RIGHT |