WeatherInformation: improvements in widget configuration layout
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 3 Nov 2014 01:33:46 +0000 (02:33 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 3 Nov 2014 01:33:46 +0000 (02:33 +0100)
app/src/main/res/layout/appwidget_configure.xml
app/src/main/res/values/styles.xml

index 9ac96a1..b9a3e9c 100644 (file)
                 android:padding="5dp"
                 android:layout_gravity="start" />
 
-            <View
-                android:layout_width="fill_parent"
-                android:layout_height="1dp"
-                android:background="#ffffffff" />
+            <View style="@style/Divider"/>
             <LinearLayout
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:padding="5dp"
                 android:layout_gravity="start" />
 
-            <View
-                android:layout_width="fill_parent"
-                android:layout_height="1dp"
-                android:background="#ffffffff" />
+            <View style="@style/Divider"/>
 
             <Spinner android:id="@+id/weather_appwidget_configure_temperature_units"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
-                android:padding="30dp"
+                android:layout_margin="20dp"
                 android:layout_gravity="center"
                 android:gravity="center"
                 android:textAlignment="center"
                 android:padding="5dp"
                 android:layout_gravity="start" />
 
-            <View
-                android:layout_width="fill_parent"
-                android:layout_height="1dp"
-                android:background="#ffffffff" />
+            <View style="@style/Divider"/>
 
             <GridLayout
                 android:layout_width="match_parent"
index 034465a..3563070 100644 (file)
     <style name="AppTheme" parent="android:Theme.Holo">
         <!-- All customizations that are NOT specific to a particular API-level can go here. -->
     </style>
-    
+
+    <style name="Divider">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">1dp</item>
+        <item name="android:layout_marginStart">20dp</item>
+        <item name="android:layout_marginEnd">20dp</item>
+        <item name="android:background">?android:attr/listDivider</item>
+    </style>
 
     <color name="weather_time_of_day_color_title">#48aed4</color>
     <color name="widget_background_holo_dark">#ff000000</color>