Layout modifications for API 11 and AppCompat
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Wed, 31 Aug 2016 22:53:07 +0000 (00:53 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Wed, 31 Aug 2016 22:53:07 +0000 (00:53 +0200)
app/src/main/res/layout-land/weather_specific_fragment.xml
app/src/main/res/layout-port/weather_specific_fragment.xml
app/src/main/res/layout/weather_main_tabs.xml
app/src/main/res/menu/weather_main_menu.xml

index e6873ed..f4c6410 100644 (file)
                            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" />
                        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"
                        android:layout_marginTop="5dp"
                        android:layout_marginBottom="5dp"
                        android:layout_marginEnd="5dp"
+                                       android:layout_marginRight="5dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textStyle="bold" />
                        </LinearLayout>
                        android:layout_marginTop="5dp"
                        android:layout_marginBottom="5dp"
                                android:layout_marginEnd="5dp"
+                                       android:layout_marginRight="5dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textStyle="bold" />
                </LinearLayout>
                        android:layout_marginTop="5dp"
                        android:layout_marginBottom="5dp"
                        android:layout_marginEnd="5dp"
+                                       android:layout_marginRight="5dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textStyle="bold" />
                        </LinearLayout>
                        android:layout_marginTop="5dp"
                        android:layout_marginBottom="5dp"
                        android:layout_marginEnd="5dp"
+                                       android:layout_marginRight="5dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textStyle="bold" />
                        </LinearLayout>
                        android:layout_marginTop="5dp"
                        android:layout_marginBottom="5dp"
                        android:layout_marginEnd="5dp"
+                                       android:layout_marginRight="5dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textStyle="bold" />
         </LinearLayout>
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:paddingEnd="30dp"
+                               android:paddingRight="30dp"
                 android:orientation="vertical" >
 
                 <!-- Time of day -->
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:paddingEnd="30dp"
+                               android:paddingRight="30dp"
                 android:orientation="vertical" >
 
                 <!-- Time of day -->
index f16a97a..5ab67de 100644 (file)
                            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" />
                        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"
                        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" />
                        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" />
                        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" />
                        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" />
                        </LinearLayout>
                        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" />
         </LinearLayout>
                                <LinearLayout
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
+                                               android:paddingRight="30dp"
                                        android:paddingEnd="30dp"
                                        android:orientation="vertical" >
                        
                                <LinearLayout
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
+                                               android:paddingRight="30dp"
                                        android:paddingEnd="30dp"
                                        android:orientation="vertical" >
                        
index 03bffef..c1e137a 100644 (file)
         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">
+    </android.support.design.widget.TabLayout>
 
     <android.support.v4.view.ViewPager
             android:id="@+id/pager"
index 3aba192..3be5333 100644 (file)
@@ -14,7 +14,8 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto" >
     
     
     <item android:id="@+id/weather_menu_settings"
         android:checkable="false"
         android:enabled="true"
         android:icon="@drawable/ic_action_settings"
-        android:showAsAction="ifRoom">
+        app:showAsAction="ifRoom">
     </item>
     <item android:id="@+id/weather_menu_map"
         android:icon="@drawable/ic_action_map"
-        android:showAsAction="ifRoom"
+        app:showAsAction="ifRoom"
         android:visible="true"
         android:checkable="false"
         android:enabled="true"
@@ -39,7 +40,7 @@
         android:titleCondensed="@string/weather_map_action_map">
     </item>
     <item android:id="@+id/weather_menu_about"
-        android:showAsAction="never"
+        app:showAsAction="never"
         android:visible="true"
         android:checkable="false"
         android:enabled="true"