Bug 1299977 - Improve Activity Stream topsites appearance r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Thu, 01 Sep 2016 16:40:33 -0700
changeset 312332 a079fff17735b34514f120e891ca49ad1501d7b0
parent 312331 884f60cd86d31b32ec4883246ace726bc93e445b
child 312333 46e86751a3429cd64ae06d3029008a20cff67d64
push id20446
push userahunt@mozilla.com
push dateFri, 02 Sep 2016 18:56:49 +0000
treeherderfx-team@46e86751a342 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1299977
milestone51.0a1
Bug 1299977 - Improve Activity Stream topsites appearance r=sebastian This patch: - moves padding, so that the topsites pagers uses the full screen width (otherwise topsites cards start disappearing where the padding starts when scrolling, which looks odd) - Adjusts background colour for AS. - Removes redundant TopSites title - Adds a divider to the bottom of topsites / above Highlights. MozReview-Commit-ID: 181COuLECtC
mobile/android/base/resources/layout/activity_stream_main_toppanel.xml
mobile/android/base/resources/layout/activity_stream_topsites_page.xml
--- a/mobile/android/base/resources/layout/activity_stream_main_toppanel.xml
+++ b/mobile/android/base/resources/layout/activity_stream_main_toppanel.xml
@@ -1,80 +1,67 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 xmlns:tools="http://schemas.android.com/tools"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 xmlns:app="http://schemas.android.com/apk/res-auto"
-                android:orientation="vertical"
-                android:padding="4dp">
-
-    <TextView
-        android:id="@+id/title_topsites"
-        android:text="@string/activity_stream_topsites"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true"
-        android:textStyle="bold"
-        android:layout_alignParentTop="true"
-        android:layout_toLeftOf="@+id/more_topsites"
-        android:layout_toStartOf="@+id/more_topsites"/>
-
-    <TextView
-        android:id="@+id/more_topsites"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentRight="true"
-        android:textAllCaps="true"
-        android:textColor="@android:color/holo_orange_dark"
-        android:textSize="14sp"
-        android:text="@string/activity_stream_more"
-        tools:text="More"
-        android:layout_alignBottom="@+id/title_topsites"/>
+                android:orientation="vertical">
 
     <android.support.v4.view.ViewPager
         android:layout_width="match_parent"
-        android:layout_height="115dp"
+        android:layout_height="123dp"
         android:id="@+id/topsites_pager"
-        android:layout_below="@+id/title_topsites"
+        android:layout_alignParentTop="true"
         android:layout_alignParentLeft="true"
         android:layout_alignParentStart="true"/>
 
     <org.mozilla.gecko.home.activitystream.topsites.CirclePageIndicator
         android:id="@+id/topsites_indicator"
         android:padding="10dip"
         app:fillColor="#444444"
         app:pageColor="#FFFFFF"
         app:strokeWidth="1dp"
         app:radius="2dp"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@+id/topsites_pager"
         android:layout_alignParentRight="true"
         android:layout_alignParentEnd="true"/>
 
+    <View
+        android:id="@+id/divider"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:padding="4dp"
+        android:background="@color/disabled_grey"
+        android:layout_below="@+id/topsites_indicator"
+        android:layout_alignRight="@+id/more_highlights"
+        android:layout_alignEnd="@+id/more_highlights"/>
+
     <TextView
         android:id="@+id/title_highlights"
+        android:padding="4dp"
         android:text="@string/activity_stream_highlights"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textStyle="bold"
-        android:layout_below="@+id/topsites_indicator"
+        android:textSize="14sp"
+        android:layout_below="@+id/divider"
         android:layout_alignParentLeft="true"
         android:layout_alignParentStart="true"
         android:layout_toLeftOf="@+id/more_highlights"
         android:layout_toStartOf="@+id/more_highlights"/>
 
     <TextView
         android:id="@+id/more_highlights"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:padding="4dp"
         android:textAllCaps="true"
         android:textColor="@android:color/holo_orange_dark"
         android:textSize="14sp"
         android:text="@string/activity_stream_more"
-        android:layout_alignTop="@+id/title_highlights"
-        android:layout_alignLeft="@+id/more_topsites"
-        android:layout_alignStart="@+id/more_topsites"/>
+        android:layout_below="@+id/divider"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentEnd="true"/>
 
 </RelativeLayout>
\ No newline at end of file
--- a/mobile/android/base/resources/layout/activity_stream_topsites_page.xml
+++ b/mobile/android/base/resources/layout/activity_stream_topsites_page.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <org.mozilla.gecko.home.activitystream.topsites.TopSitesPage xmlns:android="http://schemas.android.com/apk/res/android"
               android:orientation="vertical"
               android:layout_width="match_parent"
-              android:layout_height="match_parent"/>
+              android:layout_height="match_parent"
+              android:padding="4dp"/>