зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390356: StreamPageIconLayout -> StreamOverridablePageIconLayout. r=liuche
Now it doesn't imply it's used everywhere for page icons in activity stream. MozReview-Commit-ID: F7Z2HrhHsss --HG-- rename : mobile/android/app/src/main/res/layout/activity_stream_page_icon_layout.xml => mobile/android/app/src/main/res/layout/activity_stream_overridable_page_icon_layout.xml rename : mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamPageIconLayout.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamOverridablePageIconLayout.java extra : rebase_source : 8e5d6fe665f315da80c11a53fe5a63b85fa45c98
This commit is contained in:
Родитель
1643fa16e7
Коммит
7ade444f47
|
@ -17,7 +17,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.mozilla.gecko.activitystream.homepanel.stream.StreamPageIconLayout
|
||||
<org.mozilla.gecko.activitystream.homepanel.stream.StreamOverridablePageIconLayout
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="@dimen/favicon_bg"
|
||||
android:layout_height="@dimen/favicon_bg"
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.mozilla.gecko.util.DrawableUtil;
|
|||
import org.mozilla.gecko.util.TouchTargetUtil;
|
||||
import org.mozilla.gecko.util.URIUtils;
|
||||
import org.mozilla.gecko.util.ViewUtil;
|
||||
import org.mozilla.gecko.widget.FaviconView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.net.URI;
|
||||
|
@ -41,7 +40,7 @@ public class HighlightItem extends StreamItem {
|
|||
private Highlight highlight;
|
||||
private int position;
|
||||
|
||||
private final StreamPageIconLayout pageIconLayout;
|
||||
private final StreamOverridablePageIconLayout pageIconLayout;
|
||||
private final TextView pageTitleView;
|
||||
private final TextView pageSourceView;
|
||||
private final TextView pageDomainView;
|
||||
|
@ -57,7 +56,7 @@ public class HighlightItem extends StreamItem {
|
|||
tilesMargin = itemView.getResources().getDimensionPixelSize(R.dimen.activity_stream_base_margin);
|
||||
|
||||
pageTitleView = (TextView) itemView.findViewById(R.id.card_history_label);
|
||||
pageIconLayout = (StreamPageIconLayout) itemView.findViewById(R.id.icon);
|
||||
pageIconLayout = (StreamOverridablePageIconLayout) itemView.findViewById(R.id.icon);
|
||||
pageSourceView = (TextView) itemView.findViewById(R.id.card_history_source);
|
||||
pageDomainView = (TextView) itemView.findViewById(R.id.page);
|
||||
pageSourceIconView = (ImageView) itemView.findViewById(R.id.source_icon);
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.mozilla.gecko.widget.FaviconView;
|
|||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* A layout that represents page icons in Activity Stream.
|
||||
* A layout that represents page icons in Activity Stream, which can be overridden with a custom URL.
|
||||
*
|
||||
* Under the hood, it switches between multiple icon views because favicons (in FaviconView)
|
||||
* are handled differently from other types of page images.
|
||||
|
@ -34,7 +34,7 @@ import java.util.concurrent.Future;
|
|||
* composable switcher layout abstracts the switching state from the FaviconView and keeps it simple, but will
|
||||
* use slightly more resources.
|
||||
*/
|
||||
public class StreamPageIconLayout extends FrameLayout implements IconCallback {
|
||||
public class StreamOverridablePageIconLayout extends FrameLayout implements IconCallback {
|
||||
|
||||
private enum UIMode {
|
||||
FAVICON_IMAGE, NONFAVICON_IMAGE
|
||||
|
@ -45,9 +45,9 @@ public class StreamPageIconLayout extends FrameLayout implements IconCallback {
|
|||
|
||||
private @Nullable Future<IconResponse> ongoingFaviconLoad;
|
||||
|
||||
public StreamPageIconLayout(final Context context, final AttributeSet attrs) {
|
||||
public StreamOverridablePageIconLayout(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
LayoutInflater.from(context).inflate(R.layout.activity_stream_page_icon_layout, this, true);
|
||||
LayoutInflater.from(context).inflate(R.layout.activity_stream_overridable_page_icon_layout, this, true);
|
||||
initViews();
|
||||
}
|
||||
|
|
@ -519,7 +519,7 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
|
|||
'activitystream/homepanel/stream/HighlightItem.java',
|
||||
'activitystream/homepanel/stream/HighlightsTitle.java',
|
||||
'activitystream/homepanel/stream/StreamItem.java',
|
||||
'activitystream/homepanel/stream/StreamPageIconLayout.java',
|
||||
'activitystream/homepanel/stream/StreamOverridablePageIconLayout.java',
|
||||
'activitystream/homepanel/stream/TopPanel.java',
|
||||
'activitystream/homepanel/stream/WelcomePanel.java',
|
||||
'activitystream/homepanel/StreamItemAnimator.java',
|
||||
|
|
Загрузка…
Ссылка в новой задаче