Bug 1393274: Rename card_history_item -> webpage_item_row & friends. r=liuche
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 30 Aug 2017 11:45:27 -0700
changeset 378034 e8bc46732fe116cf263a4e607d8e04ab08b32eb5
parent 378033 bb9206cf5ceb31a15dfd3c352a0dba140394a4af
child 378035 2a39f7aa9629f1871d5ce205093419f1dcc73fa0
push id50163
push usermichael.l.comella@gmail.com
push dateThu, 31 Aug 2017 20:10:45 +0000
treeherderautoland@63b87e31320d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1393274
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1393274: Rename card_history_item -> webpage_item_row & friends. r=liuche Unrelated to RTL changes but these names are awful and gotta go! MozReview-Commit-ID: Kud6tgfEGkk
mobile/android/app/src/main/res/layout/activity_stream_card_history_item.xml
mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/WebpageItemRow.java
rename from mobile/android/app/src/main/res/layout/activity_stream_card_history_item.xml
rename to mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
--- a/mobile/android/app/src/main/res/layout/activity_stream_card_history_item.xml
+++ b/mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
@@ -13,17 +13,17 @@
     <!-- On some devices, marginBottom is ignored for Views within a RelativeLayout.
          Wrapping in a FrameLayout appears to be a sufficient workaround for this issue -->
     <FrameLayout
         android:id="@+id/icon_wrapper"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content">
 
         <org.mozilla.gecko.activitystream.homepanel.stream.StreamOverridablePageIconLayout
-                android:id="@+id/icon"
+                android:id="@+id/page_icon"
                 android:layout_width="@dimen/favicon_bg"
                 android:layout_height="@dimen/favicon_bg"
                 android:layout_marginStart="@dimen/activity_stream_base_margin"
                 android:layout_marginLeft="@dimen/activity_stream_base_margin"
                 android:layout_marginTop="@dimen/activity_stream_base_margin"
                 android:layout_marginBottom="@dimen/activity_stream_base_margin"
                 android:layout_gravity="center"
                 tools:background="@drawable/favicon_globe" />
@@ -38,35 +38,35 @@
         android:layout_alignParentRight="true"
         android:layout_alignParentTop="true"
         android:layout_gravity="right|end|top"
         android:contentDescription="@string/menu"
         android:paddingBottom="16dp"
         android:paddingTop="16dp" />
 
     <TextView
-        android:id="@+id/page"
+        android:id="@+id/page_domain"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_toEndOf="@id/icon_wrapper"
         android:layout_toLeftOf="@id/menu"
         android:layout_toRightOf="@id/icon_wrapper"
         android:layout_toStartOf="@id/menu"
         android:paddingLeft="@dimen/activity_stream_base_margin"
         android:paddingStart="@dimen/activity_stream_base_margin"
         android:paddingTop="@dimen/activity_stream_base_margin"
         android:textColor="@color/activity_stream_subtitle"
         android:textSize="12sp"
         tools:text="twitter" />
 
     <TextView
-        android:id="@+id/card_history_label"
+        android:id="@+id/page_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@id/page"
+        android:layout_below="@id/page_domain"
         android:layout_toEndOf="@id/icon_wrapper"
         android:layout_toLeftOf="@id/menu"
         android:layout_toRightOf="@id/icon_wrapper"
         android:layout_toStartOf="@id/menu"
         android:ellipsize="end"
         android:maxLines="3"
         android:paddingLeft="@dimen/activity_stream_base_margin"
         android:paddingStart="@dimen/activity_stream_base_margin"
@@ -74,37 +74,37 @@
         android:textSize="14sp"
         android:textStyle="bold"
         tools:text="Descriptive title of a page that is veeeeeeery long - maybe even too long?" />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
-        android:layout_below="@id/card_history_label"
+        android:layout_below="@id/page_title"
         android:layout_toEndOf="@id/icon_wrapper"
         android:layout_toRightOf="@id/icon_wrapper"
         android:gravity="center_vertical"
         android:orientation="horizontal"
         android:paddingBottom="@dimen/activity_stream_base_margin"
         android:paddingEnd="@dimen/activity_stream_base_margin"
         android:paddingLeft="@dimen/activity_stream_base_margin"
         android:paddingRight="@dimen/activity_stream_base_margin"
         android:paddingStart="@dimen/activity_stream_base_margin"
         android:paddingTop="4dp"
         tools:ignore="UseCompoundDrawables">
 
         <ImageView
-            android:id="@+id/source_icon"
+            android:id="@+id/page_source_icon"
             android:layout_width="12dp"
             android:layout_height="12dp"
             tools:src="@drawable/ic_as_bookmarked" />
 
         <TextView
-            android:id="@+id/card_history_source"
+            android:id="@+id/page_source"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_marginLeft="2dp"
             android:layout_weight="1"
             android:textColor="@color/activity_stream_subtitle"
             android:textSize="12sp"
             tools:text="Bookmarked" />
 
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/WebpageItemRow.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/WebpageItemRow.java
@@ -26,37 +26,37 @@ import org.mozilla.gecko.util.ViewUtil;
 import java.lang.ref.WeakReference;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.UUID;
 
 public class WebpageItemRow extends StreamViewHolder {
     private static final String LOGTAG = "GeckoWebpageItemRow";
 
-    public static final int LAYOUT_ID = R.layout.activity_stream_card_history_item;
+    public static final int LAYOUT_ID = R.layout.activity_stream_webpage_item_row;
     private static final double SIZE_RATIO = 0.75;
 
     private WebpageRowModel webpageModel;
     private int position;
 
     private final StreamOverridablePageIconLayout pageIconLayout;
     private final TextView pageDomainView;
     private final TextView pageTitleView;
     private final ImageView pageSourceIconView;
     private final TextView pageSourceView;
     private final ImageView menuButton;
 
     public WebpageItemRow(final View itemView, final StreamHighlightItemRowContextMenuListener contextMenuListener) {
         super(itemView);
 
-        pageTitleView = (TextView) itemView.findViewById(R.id.card_history_label);
-        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);
+        pageTitleView = (TextView) itemView.findViewById(R.id.page_title);
+        pageIconLayout = (StreamOverridablePageIconLayout) itemView.findViewById(R.id.page_icon);
+        pageSourceView = (TextView) itemView.findViewById(R.id.page_source);
+        pageDomainView = (TextView) itemView.findViewById(R.id.page_domain);
+        pageSourceIconView = (ImageView) itemView.findViewById(R.id.page_source_icon);
 
         menuButton = (ImageView) itemView.findViewById(R.id.menu);
         menuButton.setImageDrawable(
                 DrawableUtil.tintDrawable(menuButton.getContext(), R.drawable.menu, Color.LTGRAY));
         TouchTargetUtil.ensureTargetHitArea(menuButton, itemView);
         ViewUtil.enableTouchRipple(menuButton);
         menuButton.setOnClickListener(new View.OnClickListener() {
             @Override