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

--HG--
extra : rebase_source : d3053e4c0ea31ecb250ddae4448172e4dbaf1e3e
This commit is contained in:
Andrzej Hunt 2016-09-01 16:40:33 -07:00
parent d6d08dda63
commit 9ac761e04f
2 changed files with 22 additions and 34 deletions

View File

@ -4,39 +4,13 @@
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"/>
@ -53,13 +27,25 @@
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"
@ -69,12 +55,13 @@
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>

View File

@ -2,4 +2,5 @@
<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"/>