Bug 1009473 - Remove padding around list item images. r=lucasr, a=lsblakk
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 13 May 2014 18:26:04 +0100
changeset 192358 841a1b085b5b
parent 192357 36df173cb6a2
child 192359 82c33d14844a
push id3583
push userryanvm@gmail.com
push date2014-05-22 12:45 +0000
treeherdermozilla-beta@eac674ed7cfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, lsblakk
bugs1009473
milestone30.0
Bug 1009473 - Remove padding around list item images. r=lucasr, a=lsblakk
mobile/android/base/home/PanelItemView.java
mobile/android/base/resources/layout/panel_article_item.xml
mobile/android/base/resources/values/dimens.xml
--- a/mobile/android/base/home/PanelItemView.java
+++ b/mobile/android/base/home/PanelItemView.java
@@ -69,19 +69,16 @@ class PanelItemView extends LinearLayout
                    .into(mImage);
         }
     }
 
     private static class ArticleItemView extends PanelItemView {
         private ArticleItemView(Context context) {
             super(context, R.layout.panel_article_item);
             setOrientation(LinearLayout.HORIZONTAL);
-
-            final int padding = getResources().getDimensionPixelSize(R.dimen.article_item_view_padding);
-            setPadding(0, padding, 0, padding);
         }
     }
 
     private static class ImageItemView extends PanelItemView {
         private ImageItemView(Context context) {
             super(context, R.layout.panel_image_item);
             setOrientation(LinearLayout.VERTICAL);
         }
--- a/mobile/android/base/resources/layout/panel_article_item.xml
+++ b/mobile/android/base/resources/layout/panel_article_item.xml
@@ -1,35 +1,35 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <merge xmlns:android="http://schemas.android.com/apk/res/android">
 
     <ImageView android:id="@+id/image"
-               android:layout_width="54dp"
-               android:layout_height="44dp"
-               android:layout_marginLeft="10dip"
+               android:layout_width="@dimen/panel_article_item_height"
+               android:layout_height="@dimen/panel_article_item_height"
                android:scaleType="centerCrop"/>
 
     <LinearLayout android:id="@+id/title_desc_container"
                   android:layout_width="fill_parent"
-                  android:layout_height="wrap_content"
-                  android:paddingLeft="10dip"
-                  android:paddingRight="10dip"
+                  android:layout_height="@dimen/panel_article_item_height"
+                  android:paddingLeft="15dip"
+                  android:paddingRight="15dip"
                   android:gravity="center_vertical"
                   android:orientation="vertical">
 
         <TextView android:id="@+id/title"
                   style="@style/Widget.PanelItemView.Title"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"/>
 
         <TextView android:id="@+id/description"
                   style="@style/Widget.PanelItemView.Description"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
+                  android:layout_marginTop="1dp"
                   android:maxLength="1024"/>
 
     </LinearLayout>
 
 </merge>
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -105,11 +105,11 @@
 
     <!-- Icon Grid -->
     <dimen name="icongrid_columnwidth">128dp</dimen>
     <dimen name="icongrid_padding">16dp</dimen>
 
     <!-- PanelGridView dimensions -->
     <dimen name="panel_grid_view_column_width">150dp</dimen>
 
-    <!-- ArticleItemView dimensions -->
-    <dimen name="article_item_view_padding">15dp</dimen>
+    <!-- PanelItemView dimensions -->
+    <dimen name="panel_article_item_height">95dp</dimen>
 </resources>