diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2019-05-19 12:01:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 12:01:45 +0200 |
commit | 8f93e3b2e209510f8c8eef0b79a880d70c978f7c (patch) | |
tree | 9a4c9b53b6807459c5f723aeda83700afd574532 | |
parent | 751670a6590476c3398c2d397d817f6fe978e8c4 (diff) | |
parent | e9e61776edce8df21b7b0b69aa7eaf98c0c0f6af (diff) | |
download | AntennaPod-8f93e3b2e209510f8c8eef0b79a880d70c978f7c.zip |
Merge pull request #3172 from andersonvom/3169-cover-fragment-small-screen
Fix cover fragment in small screens
-rw-r--r-- | app/build.gradle | 1 | ||||
-rw-r--r-- | app/src/main/res/layout/cover_fragment.xml | 85 | ||||
-rw-r--r-- | core/build.gradle | 1 |
3 files changed, 29 insertions, 58 deletions
diff --git a/app/build.gradle b/app/build.gradle index 942a98bbf..711048239 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -131,7 +131,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 @@ <?xml version="1.0" encoding="utf-8"?> - -<android.support.percent.PercentRelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="8dp"> + + <TextView + android:id="@+id/txtvPodcastTitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:ellipsize="end" + android:gravity="center" + android:maxLines="2" + android:textColor="?android:attr/textColorSecondary" + android:textIsSelectable="true" + tools:text="Podcast" /> <ImageView android:id="@+id/imgvCover" - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_centerInParent="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" android:contentDescription="@string/cover_label" android:scaleType="fitCenter" - app:layout_aspectRatio="100%" - app:layout_widthPercent="82%" android:transitionName="coverTransition" tools:src="@android:drawable/sym_def_app_icon" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:gravity="center" - android:orientation="vertical" - android:layout_above="@id/imgvCover"> - - <TextView - android:id="@+id/txtvPodcastTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:gravity="center" - android:maxLines="2" - android:ellipsize="end" - android:text="Podcast" - android:textIsSelectable="true" - android:textColor="?android:attr/textColorSecondary" /> - - </LinearLayout> - - <LinearLayout + <TextView + android:id="@+id/txtvEpisodeTitle" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:ellipsize="end" android:gravity="center" - android:orientation="vertical" - android:layout_below="@id/imgvCover"> - - <TextView - android:id="@+id/txtvEpisodeTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:gravity="center" - android:maxLines="2" - android:ellipsize="end" - android:text="Episode" - android:textIsSelectable="true" - android:textColor="?android:attr/textColorPrimary" /> - - </LinearLayout> + android:maxLines="2" + android:textColor="?android:attr/textColorPrimary" + android:textIsSelectable="true" + tools:text="Episode" /> -</android.support.percent.PercentRelativeLayout> +</LinearLayout> 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") { |