From 0729afc1607add389c7044288b9e58e54ae440be Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Mon, 8 Sep 2014 15:25:24 +0200 Subject: [PATCH] WeatherInformation Android: current and specific Layouts, final improvements. --- .../res/layout/weather_current_fragment.xml | 72 ++++++++++++---------- .../res/layout/weather_specific_fragment.xml | 31 +++++----- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/Android/WeatherInformation/res/layout/weather_current_fragment.xml b/Android/WeatherInformation/res/layout/weather_current_fragment.xml index e6a42cd..9e2b192 100644 --- a/Android/WeatherInformation/res/layout/weather_current_fragment.xml +++ b/Android/WeatherInformation/res/layout/weather_current_fragment.xml @@ -99,7 +99,8 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:layout_gravity="top|start" + android:gravity="center" + android:layout_gravity="center" android:orientation="horizontal" > @@ -207,7 +209,8 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:layout_gravity="top|start" + android:gravity="center" + android:layout_gravity="center" android:orientation="horizontal" > @@ -315,7 +319,8 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:layout_gravity="top|center" + android:gravity="center" + android:layout_gravity="center" android:orientation="horizontal" > @@ -373,7 +379,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="CLOUDS" - android:layout_gravity="top|center" + android:layout_gravity="end" android:gravity="end" android:textAlignment="textEnd" android:textColor="@color/weather_time_of_day_color_title" @@ -387,7 +393,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="6.36" - android:layout_gravity="top|center" + android:layout_gravity="end" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:gravity="end" @@ -401,7 +407,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="%" - android:layout_gravity="top|center" + android:layout_gravity="end" android:gravity="end" android:textAlignment="textEnd" android:layout_marginTop="5dp" @@ -423,9 +429,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="PRESSURE" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:textColor="@color/weather_time_of_day_color_title" android:layout_margin="5dp" android:textAppearance="?android:attr/textAppearanceMedium" @@ -437,9 +443,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1036.05" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:textAppearance="?android:attr/textAppearanceSmall" @@ -451,9 +457,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" hpa" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" @@ -472,9 +478,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="SUN RISE" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:textColor="@color/weather_time_of_day_color_title" android:layout_margin="5dp" android:textAppearance="?android:attr/textAppearanceMedium" @@ -486,9 +492,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2014.04.20 10:29:33" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:textAppearance="?android:attr/textAppearanceSmall" @@ -506,9 +512,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="SUN SET" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:textColor="@color/weather_time_of_day_color_title" android:layout_margin="5dp" android:textAppearance="?android:attr/textAppearanceMedium" @@ -520,9 +526,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2014.04.20 10:29:33" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:textAppearance="?android:attr/textAppearanceSmall" diff --git a/Android/WeatherInformation/res/layout/weather_specific_fragment.xml b/Android/WeatherInformation/res/layout/weather_specific_fragment.xml index f4ef531..bf2102d 100644 --- a/Android/WeatherInformation/res/layout/weather_specific_fragment.xml +++ b/Android/WeatherInformation/res/layout/weather_specific_fragment.xml @@ -99,7 +99,8 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:layout_gravity="top|start" + android:gravity="center" + android:layout_gravity="center" android:orientation="horizontal" > @@ -208,7 +210,8 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:layout_gravity="top|start" + android:gravity="center" + android:layout_gravity="center" android:orientation="horizontal" > @@ -258,7 +261,8 @@ @@ -317,9 +321,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="PRESSURE" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:textColor="@color/weather_time_of_day_color_title" android:layout_margin="5dp" android:textAppearance="?android:attr/textAppearanceMedium" @@ -331,9 +335,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1036.05" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:textAppearance="?android:attr/textAppearanceSmall" @@ -345,9 +349,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" hpa" - android:layout_gravity="start" - android:gravity="start" - android:textAlignment="textStart" + android:layout_gravity="center" + android:gravity="center" + android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" @@ -360,7 +364,6 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|start" android:fadingEdge="none" - android:padding="25dp" android:scrollbars="horizontal|none" >