Fix bug  #15384992 Setting Dashboard - padding updates

- make padding start / end to "0dip" for Preferences ListView
- update also Battery History Chart padding to be compatible
with other layouts

See bug: #15384992 Setting Dashboard - padding updates

Change-Id: I1faae1186322965d7077e92418a507720bab75cf
diff --git a/res/layout/battery_history_chart.xml b/res/layout/battery_history_chart.xml
index 0d3e185..48eb7ed 100644
--- a/res/layout/battery_history_chart.xml
+++ b/res/layout/battery_history_chart.xml
@@ -14,22 +14,29 @@
      limitations under the License.
 -->
 
-<com.android.settings.fuelgauge.BatteryHistoryChart
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res/com.android.settings"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:id="@+android:id/battery_history_chart"
-    android:paddingEnd="?android:attr/scrollbarSize"
-    android:textAppearance="?android:attr/textAppearanceSmall"
-    android:textColor="#ff000000"
-    app:headerAppearance="?android:attr/textAppearanceMedium"
-    android:shadowRadius="4"
-    android:shadowColor="?android:attr/colorBackground"
-    android:shadowDx="2"
-    android:shadowDy="2"
-    app:barPrimaryColor="?android:attr/colorControlActivated"
-    app:barPredictionColor="@color/material_empty_color_light"
-    app:chartMinHeight="@dimen/battery_history_chart_height">
-</com.android.settings.fuelgauge.BatteryHistoryChart>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
+
+    <com.android.settings.fuelgauge.BatteryHistoryChart
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:app="http://schemas.android.com/apk/res/com.android.settings"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center_vertical"
+        android:id="@+android:id/battery_history_chart"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="#ff000000"
+        app:headerAppearance="?android:attr/textAppearanceMedium"
+        android:shadowRadius="4"
+        android:shadowColor="?android:attr/colorBackground"
+        android:shadowDx="2"
+        android:shadowDy="2"
+        app:barPrimaryColor="?android:attr/colorControlActivated"
+        app:barPredictionColor="@color/material_empty_color_light"
+        app:chartMinHeight="@dimen/battery_history_chart_height">
+    </com.android.settings.fuelgauge.BatteryHistoryChart>
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/preference_batteryhistory.xml b/res/layout/preference_batteryhistory.xml
index 766ec51..723b0e1 100644
--- a/res/layout/preference_batteryhistory.xml
+++ b/res/layout/preference_batteryhistory.xml
@@ -18,11 +18,11 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical"
-        android:minHeight="@dimen/battery_history_chart_height"
-        android:paddingEnd="?android:attr/scrollbarSize">
+        android:minHeight="@dimen/battery_history_chart_height">
     <include layout="@layout/battery_history_chart" />
     <TextView android:id="@+id/labelsHeader"
-              android:layout_width="match_parent" android:layout_height="48dp"
+              android:layout_width="match_parent"
+              android:layout_height="48dp"
               android:textAppearance="?android:attr/textAppearanceMedium"
               android:textSize="14sp"
               android:textColor="?android:attr/colorControlActivated"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d3c4334..eef43a7 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -74,7 +74,7 @@
 
     <dimen name="captioning_preview_height">200dp</dimen>
 
-    <dimen name="settings_side_margin">@*android:dimen/preference_fragment_padding_side</dimen>
+    <dimen name="settings_side_margin">0dip</dimen>
 
     <!-- Weight of the left pane in a multi-pane preference layout. -->
     <integer name="preferences_left_pane_weight">4</integer>