From e9e61776edce8df21b7b0b69aa7eaf98c0c0f6af Mon Sep 17 00:00:00 2001 From: Anderson Mesquita Date: Wed, 8 May 2019 09:48:00 -0400 Subject: [PATCH] Fix cover fragment in small screens The cover fragment would hide both podcast and episode names in small screen devices or multi-window mode. This replaces the deprecated PercentRelativeLayout in favor of a regular LinearLayout with weights to make sure that each section of the fragment (podcast title, image, episode name) will have the necessary space in the screen. Since PercentRelativeLayout was only being used here, it also removes the dependencies from the gradle files. Closes: #3169 --- app/build.gradle | 1 - app/src/main/res/layout/cover_fragment.xml | 85 ++++++++-------------- core/build.gradle | 1 - 3 files changed, 29 insertions(+), 58 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 572575182..b2cd1f3be 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -130,7 +130,6 @@ dependencies { implementation "com.android.support:design:$supportVersion" implementation "com.android.support:preference-v14:$supportVersion" implementation "com.android.support:gridlayout-v7:$supportVersion" - implementation "com.android.support:percent:$supportVersion" implementation "com.android.support:recyclerview-v7:$supportVersion" compileOnly 'com.google.android.wearable:wearable:2.2.0' implementation "org.apache.commons:commons-lang3:$commonslangVersion" diff --git a/app/src/main/res/layout/cover_fragment.xml b/app/src/main/res/layout/cover_fragment.xml index b1e93a195..fec7be26c 100644 --- a/app/src/main/res/layout/cover_fragment.xml +++ b/app/src/main/res/layout/cover_fragment.xml @@ -1,70 +1,43 @@ - - + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="8dp"> + + - + android:maxLines="2" + android:textColor="?android:attr/textColorPrimary" + android:textIsSelectable="true" + tools:text="Episode" /> - - - - - - - - - - - + diff --git a/core/build.gradle b/core/build.gradle index 65dfa1a7b..01efdaa0b 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -44,7 +44,6 @@ dependencies { implementation "com.android.support:support-v4:$supportVersion" implementation "com.android.support:appcompat-v7:$supportVersion" implementation "com.android.support:preference-v14:$supportVersion" - implementation "com.android.support:percent:$supportVersion" implementation "org.apache.commons:commons-lang3:$commonslangVersion" implementation "org.apache.commons:commons-text:$commonstextVersion" implementation ("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") {