From 15b58128f4be45080caef832543eb04d999d50e9 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 26 Nov 2015 20:16:23 +0100 Subject: [PATCH] fiexed lint layout suggestions --- .../layout-land/fragment_videoitem_detail.xml | 24 ++++++++++++++++--- .../fragment_videoitem_detail.xml | 24 ++++++++++++++++--- .../main/res/layout/activity_play_video.xml | 4 ++-- .../res/layout/fragment_videoitem_detail.xml | 17 +++++++++++++ app/src/main/res/layout/video_item.xml | 7 ++++++ app/src/main/res/menu/videoitem_list.xml | 2 +- 6 files changed, 69 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/layout-land/fragment_videoitem_detail.xml b/app/src/main/res/layout-land/fragment_videoitem_detail.xml index dbbff1e45..02201f9f4 100644 --- a/app/src/main/res/layout-land/fragment_videoitem_detail.xml +++ b/app/src/main/res/layout-land/fragment_videoitem_detail.xml @@ -36,6 +36,7 @@ android:layout_height="wrap_content" android:scaleType="centerInside" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:adjustViewBounds="true" android:src="@drawable/dummy_thumbnail"/> @@ -53,6 +54,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textStyle="bold" android:paddingBottom="5dp" android:textSize="@dimen/text_video_title_land_size" @@ -64,6 +66,7 @@ android:layout_height="100dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:src="@drawable/buddy" /> @@ -81,6 +85,7 @@ android:paddingBottom="5dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_views_land_size" android:textAppearance="?android:attr/textAppearanceLarge"/> @@ -89,7 +94,10 @@ android:layout_height="wrap_content" android:layout_below="@id/detailViewCountView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_like_land_size" + android:paddingRight="5dp" + android:paddingLeft="5dp" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -115,8 +127,10 @@ android:layout_width="40dp" android:layout_height="20dp" android:layout_below="@id/detailViewCountView" - android:paddingRight="10dp" + android:paddingRight="5dp" + android:paddingLeft="5dp" android:layout_toLeftOf="@id/detailThumbsUpCountView" + android:layout_toStartOf="@id/detailThumbsUpImgView" android:src="@drawable/thumbs_up" /> @@ -132,6 +147,7 @@ android:layout_height="wrap_content" android:layout_below="@id/detailUploadDateView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textSize="@dimen/text_video_description_land_size" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -146,6 +162,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:paddingLeft="6dp" android:paddingRight="6dp" android:paddingTop="20dp" @@ -187,6 +204,7 @@ @@ -53,6 +54,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textStyle="bold" android:paddingBottom="5dp" android:textSize="@dimen/text_video_title_sw600dp_size" @@ -64,6 +66,7 @@ android:layout_height="100dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:src="@drawable/buddy" /> @@ -81,6 +85,7 @@ android:paddingBottom="5dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_views_sw600dp_size" android:textAppearance="?android:attr/textAppearanceLarge"/> @@ -89,7 +94,10 @@ android:layout_height="wrap_content" android:layout_below="@id/detailViewCountView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_like_sw600dp_size" + android:paddingRight="5dp" + android:paddingLeft="5dp" android:textAppearance="?android:attr/textAppearanceMedium"/> @@ -115,8 +127,10 @@ android:layout_width="40dp" android:layout_height="20dp" android:layout_below="@id/detailViewCountView" - android:paddingRight="10dp" + android:paddingRight="5dp" + android:paddingLeft="5dp" android:layout_toLeftOf="@id/detailThumbsUpCountView" + android:layout_toStartOf="@id/detailThumbsUpImgView" android:src="@drawable/thumbs_up" /> @@ -132,6 +147,7 @@ android:layout_height="wrap_content" android:layout_below="@id/detailUploadDateView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textSize="@dimen/text_video_description_sw600dp_size" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -146,6 +162,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:paddingLeft="6dp" android:paddingRight="6dp" android:paddingTop="20dp" @@ -186,6 +203,7 @@ - + diff --git a/app/src/main/res/layout/fragment_videoitem_detail.xml b/app/src/main/res/layout/fragment_videoitem_detail.xml index 340a07358..02f7a0eb9 100644 --- a/app/src/main/res/layout/fragment_videoitem_detail.xml +++ b/app/src/main/res/layout/fragment_videoitem_detail.xml @@ -36,6 +36,7 @@ android:layout_height="wrap_content" android:scaleType="centerInside" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:adjustViewBounds="true" android:src="@drawable/dummy_thumbnail"/> @@ -53,6 +54,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textStyle="bold" android:paddingBottom="3dp" android:textSize="@dimen/text_video_title_size" @@ -64,6 +66,7 @@ android:layout_height="80dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:src="@drawable/buddy" /> @@ -81,6 +85,7 @@ android:paddingBottom="3dp" android:layout_below="@id/detailVideoTitleView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_views_size" android:textAppearance="?android:attr/textAppearanceLarge" /> @@ -89,7 +94,10 @@ android:layout_height="wrap_content" android:layout_below="@id/detailViewCountView" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:textSize="@dimen/text_video_like_size" + android:paddingRight="5dp" + android:paddingLeft="5dp" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -116,7 +128,9 @@ android:layout_height="15dp" android:layout_below="@id/detailViewCountView" android:layout_toLeftOf="@id/detailThumbsUpCountView" + android:layout_toStartOf="@id/detailThumbsUpImgView" android:paddingRight="5dp" + android:paddingLeft="5dp" android:src="@drawable/thumbs_up" /> @@ -132,6 +147,7 @@ android:layout_height="wrap_content" android:layout_below="@id/detailUploadDateView" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textSize="@dimen/text_video_description_size" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -151,6 +167,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:textSize="@dimen/text_video_upload_date_size" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@android:color/black" diff --git a/app/src/main/res/layout/video_item.xml b/app/src/main/res/layout/video_item.xml index 9433bd4f7..bac7d7964 100644 --- a/app/src/main/res/layout/video_item.xml +++ b/app/src/main/res/layout/video_item.xml @@ -10,9 +10,11 @@ android:contentDescription="@string/itemThumbnailViewDescription" android:layout_width="142dp" android:layout_height="80dp" + android:layout_marginEnd="6dp" android:layout_marginRight="6dp" android:scaleType="centerCrop" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:src="@drawable/dummy_thumbnail"/> @@ -20,6 +22,7 @@ android:layout_width="wrap_content" android:layout_height="36dp" android:layout_toRightOf="@id/itemThumbnailView" + android:layout_toEndOf="@id/itemThumbnailView" android:layout_alignParentTop="true" android:textAppearance="?android:attr/textAppearanceLarge" android:textSize="@dimen/text_search_title_size"/> @@ -28,6 +31,7 @@ android:layout_width="wrap_content" android:layout_height="18dp" android:layout_toRightOf="@id/itemThumbnailView" + android:layout_toEndOf="@id/itemThumbnailView" android:layout_below="@id/itemVideoTitleView" android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="@dimen/text_search_uploader_size"/> @@ -36,6 +40,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/itemThumbnailView" + android:layout_toEndOf="@id/itemThumbnailView" android:layout_below="@id/itemUploaderView" android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="@dimen/text_search_uploadtime_size" @@ -46,7 +51,9 @@ android:layout_height="wrap_content" android:layout_alignBottom="@id/itemThumbnailView" android:layout_alignRight="@id/itemThumbnailView" + android:layout_alignEnd="@id/itemThumbnailView" android:layout_marginRight="2dp" + android:layout_marginEnd="2dp" android:layout_marginBottom="2dp" android:paddingTop="1dp" android:paddingBottom="1dp" diff --git a/app/src/main/res/menu/videoitem_list.xml b/app/src/main/res/menu/videoitem_list.xml index cd85a2053..54d582dc6 100644 --- a/app/src/main/res/menu/videoitem_list.xml +++ b/app/src/main/res/menu/videoitem_list.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto">