From d98b7413a4689573921ecfbefc36da1426094334 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Thu, 1 Sep 2016 00:53:07 +0200 Subject: [PATCH] Layout modifications for API 11 and AppCompat --- .../res/layout-land/weather_specific_fragment.xml | 17 +++++++++++++++-- .../res/layout-port/weather_specific_fragment.xml | 21 +++++++++++++++++---- app/src/main/res/layout/weather_main_tabs.xml | 8 ++++++-- app/src/main/res/menu/weather_main_menu.xml | 9 +++++---- 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/app/src/main/res/layout-land/weather_specific_fragment.xml b/app/src/main/res/layout-land/weather_specific_fragment.xml index e6873ed..f4c6410 100644 --- a/app/src/main/res/layout-land/weather_specific_fragment.xml +++ b/app/src/main/res/layout-land/weather_specific_fragment.xml @@ -62,9 +62,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="10dp" + android:paddingRight="10dp" android:paddingStart="20dp" + android:paddingLeft="20dp" android:singleLine="true" android:text="55ºC" + android:layout_gravity="start" android:textAlignment="textStart" android:textAppearance="?android:attr/textAppearanceLarge" android:textStyle="bold" /> @@ -73,9 +76,12 @@ android:id="@+id/weather_specific_temp_min" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="start" android:textAlignment="textStart" - android:paddingEnd="10dp" - android:paddingStart="20dp" + android:paddingEnd="10dp" + android:paddingRight="10dp" + android:paddingStart="20dp" + android:paddingLeft="20dp" android:singleLine="true" android:text="25ºC" android:textAppearance="?android:attr/textAppearanceMedium" @@ -156,6 +162,7 @@ android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -207,6 +214,7 @@ android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -268,6 +276,7 @@ android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -319,6 +328,7 @@ android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -369,6 +379,7 @@ android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -389,6 +400,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="30dp" + android:paddingRight="30dp" android:orientation="vertical" > @@ -473,6 +485,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="30dp" + android:paddingRight="30dp" android:orientation="vertical" > diff --git a/app/src/main/res/layout-port/weather_specific_fragment.xml b/app/src/main/res/layout-port/weather_specific_fragment.xml index f16a97a..5ab67de 100644 --- a/app/src/main/res/layout-port/weather_specific_fragment.xml +++ b/app/src/main/res/layout-port/weather_specific_fragment.xml @@ -61,10 +61,13 @@ android:id="@+id/weather_specific_temp_max" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingRight="10dp" android:paddingEnd="10dp" android:paddingStart="20dp" + android:paddingLeft="20dp" android:singleLine="true" android:text="55ºC" + android:layout_gravity="start" android:textAlignment="textStart" android:textAppearance="?android:attr/textAppearanceLarge" android:textStyle="bold" /> @@ -73,9 +76,12 @@ android:id="@+id/weather_specific_temp_min" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="start" android:textAlignment="textStart" - android:paddingEnd="10dp" - android:paddingStart="20dp" + android:paddingRight="10dp" + android:paddingEnd="10dp" + android:paddingStart="20dp" + android:paddingLeft="20dp" android:singleLine="true" android:text="25ºC" android:textAppearance="?android:attr/textAppearanceMedium" @@ -155,6 +161,7 @@ android:textAlignment="textStart" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" + android:layout_marginRight="5dp" android:layout_marginEnd="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -206,6 +213,7 @@ android:textAlignment="textEnd" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" + android:layout_marginRight="5dp" android:layout_marginEnd="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -267,6 +275,7 @@ android:textAlignment="textStart" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" + android:layout_marginRight="5dp" android:layout_marginEnd="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -318,7 +327,8 @@ android:textAlignment="textEnd" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" - android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" + android:layout_marginEnd="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -368,7 +378,8 @@ android:textAlignment="center" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" - android:layout_marginEnd="5dp" + android:layout_marginRight="5dp" + android:layout_marginEnd="5dp" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> @@ -393,6 +404,7 @@ @@ -477,6 +489,7 @@ diff --git a/app/src/main/res/layout/weather_main_tabs.xml b/app/src/main/res/layout/weather_main_tabs.xml index 03bffef..c1e137a 100644 --- a/app/src/main/res/layout/weather_main_tabs.xml +++ b/app/src/main/res/layout/weather_main_tabs.xml @@ -26,8 +26,12 @@ android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" - app:tabMode="scrollable" - android:fillViewport="false" /> + android:layout_gravity="top" + app:tabMaxWidth="0dp" + app:tabGravity="fill" + app:tabMode="fixed" + android:fillViewport="false"> + - + + app:showAsAction="ifRoom">