From a07e4c69b65fd780eb7b5b210e8090ebb41a4102 Mon Sep 17 00:00:00 2001 From: len Date: Tue, 8 Mar 2016 17:39:59 +0100 Subject: [PATCH] Fix crashes with vector drawables on older Android versions --- app/src/main/res/layout/activity_edit_categories.xml | 2 +- app/src/main/res/layout/fragment_manga_chapters.xml | 3 ++- app/src/main/res/layout/fragment_manga_info.xml | 2 +- app/src/main/res/layout/item_chapter.xml | 5 +++-- app/src/main/res/layout/item_edit_categories.xml | 3 ++- app/src/main/res/layout/item_recent_chapter.xml | 5 +++-- app/src/main/res/layout/reader_menu.xml | 10 +++++----- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/src/main/res/layout/activity_edit_categories.xml b/app/src/main/res/layout/activity_edit_categories.xml index 5f044468f7..55ae9acc0b 100644 --- a/app/src/main/res/layout/activity_edit_categories.xml +++ b/app/src/main/res/layout/activity_edit_categories.xml @@ -25,7 +25,7 @@ android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:scaleType="fitCenter" - android:src="@drawable/ic_add_white_24dp" + app:srcCompat="@drawable/ic_add_white_24dp" app:backgroundTint="@color/colorPrimary" app:layout_anchor="@id/recycler" app:layout_anchorGravity="bottom|right|end" diff --git a/app/src/main/res/layout/fragment_manga_chapters.xml b/app/src/main/res/layout/fragment_manga_chapters.xml index 13b735139e..d2aa66dee1 100644 --- a/app/src/main/res/layout/fragment_manga_chapters.xml +++ b/app/src/main/res/layout/fragment_manga_chapters.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical"> diff --git a/app/src/main/res/layout/fragment_manga_info.xml b/app/src/main/res/layout/fragment_manga_info.xml index 23c7c4095d..dc273685f3 100644 --- a/app/src/main/res/layout/fragment_manga_info.xml +++ b/app/src/main/res/layout/fragment_manga_info.xml @@ -244,7 +244,7 @@ android:layout_width="@dimen/fab_size" android:layout_height="@dimen/fab_size" android:layout_margin="@dimen/fab_margin" - android:src="@drawable/ic_bookmark_border_white_24dp" + app:srcCompat="@drawable/ic_bookmark_border_white_24dp" app:backgroundTint="@color/colorPrimary" app:layout_anchor="@id/top_view" app:layout_anchorGravity="bottom|right|end"/> diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/item_chapter.xml index 4ceac37b00..c34d6dddae 100644 --- a/app/src/main/res/layout/item_chapter.xml +++ b/app/src/main/res/layout/item_chapter.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" + xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@drawable/selector_chapter_light"> @@ -94,8 +95,8 @@ android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:background="?android:selectableItemBackground" - android:src="@drawable/ic_more_horiz_black_24dp" - /> + app:srcCompat="@drawable/ic_more_horiz_black_24dp"/> + diff --git a/app/src/main/res/layout/item_edit_categories.xml b/app/src/main/res/layout/item_edit_categories.xml index 95240c59c3..aa80ba9f36 100644 --- a/app/src/main/res/layout/item_edit_categories.xml +++ b/app/src/main/res/layout/item_edit_categories.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeightLarge" + xmlns:app="http://schemas.android.com/apk/res-auto" android:paddingTop="8dp" android:paddingBottom="8dp" android:background="@drawable/selector_chapter_light"> @@ -32,7 +33,7 @@ android:layout_centerInParent="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:src="@drawable/ic_reorder_grey_24dp"/> + app:srcCompat="@drawable/ic_reorder_grey_24dp"/> @@ -89,8 +90,8 @@ android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:background="?android:selectableItemBackground" - android:src="@drawable/ic_more_horiz_black_24dp" - /> + app:srcCompat="@drawable/ic_more_horiz_black_24dp"/> + diff --git a/app/src/main/res/layout/reader_menu.xml b/app/src/main/res/layout/reader_menu.xml index b8831ab5cc..d319134243 100644 --- a/app/src/main/res/layout/reader_menu.xml +++ b/app/src/main/res/layout/reader_menu.xml @@ -75,7 +75,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/lock_orientation" - android:src="@drawable/ic_screen_rotation_white_24dp" + app:srcCompat="@drawable/ic_screen_rotation_white_24dp" android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" /> @@ -84,7 +84,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/reader_zoom_selector" - android:src="@drawable/ic_crop_original_white_24dp" + app:srcCompat="@drawable/ic_crop_original_white_24dp" android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground"/> @@ -93,7 +93,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/reader_scale_type_selector" - android:src="@drawable/ic_zoom_out_map_white_24dp" + app:srcCompat="@drawable/ic_zoom_out_map_white_24dp" android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" /> @@ -102,7 +102,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/reader_selector" - android:src="@drawable/ic_view_carousel_white_24dp" + app:srcCompat="@drawable/ic_view_carousel_white_24dp" android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" /> @@ -111,7 +111,7 @@ android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/reader_extra_settings" - android:src="@drawable/ic_more_vert_white_24dp" + app:srcCompat="@drawable/ic_more_vert_white_24dp" android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" />