diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2018-01-04 22:10:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 22:10:49 +0100 |
commit | 8b84b7003273c7dad7a17fa37b78fd6d17af056c (patch) | |
tree | 5126bf3a841e56bd402c2d0b7a840bc95d7e1888 /app/src/main | |
parent | 204c97b8de40ae5388171bc549bc6392c7c3d8fb (diff) | |
parent | 529d6502acf3c4c2adf86658e71579293b2cdd82 (diff) | |
download | AntennaPod-8b84b7003273c7dad7a17fa37b78fd6d17af056c.zip |
Merge pull request #2333 from ByteHamster/item-height
Improved list items when using a large font size
Diffstat (limited to 'app/src/main')
12 files changed, 73 insertions, 72 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java index 3e8bbc488..f12c8285a 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java @@ -174,7 +174,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR holder.progress.setVisibility(View.VISIBLE); } } else { - holder.progress.setVisibility(View.GONE); + holder.progress.setVisibility(View.INVISIBLE); } if(media.isCurrentlyPlaying()) { @@ -183,7 +183,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR holder.container.setBackgroundColor(normalBackGroundColor); } } else { - holder.progress.setVisibility(View.GONE); + holder.progress.setVisibility(View.INVISIBLE); holder.txtvDuration.setVisibility(View.GONE); } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index 35c42725c..f843ddb94 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -157,7 +157,7 @@ public class FeedItemlistAdapter extends BaseAdapter { FeedMedia media = item.getMedia(); if (media == null) { - holder.episodeProgress.setVisibility(View.GONE); + holder.episodeProgress.setVisibility(View.INVISIBLE); holder.inPlaylist.setVisibility(View.INVISIBLE); holder.type.setVisibility(View.INVISIBLE); holder.lenSize.setVisibility(View.INVISIBLE); @@ -176,7 +176,7 @@ public class FeedItemlistAdapter extends BaseAdapter { holder.episodeProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item)); } else { if(media.getPosition() == 0) { - holder.episodeProgress.setVisibility(View.GONE); + holder.episodeProgress.setVisibility(View.INVISIBLE); } } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java index c6ddc6c86..2684dcccd 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java @@ -280,7 +280,7 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap progressLeft.setText(""); } progressRight.setText(Converter.getDurationStringLong(media.getDuration())); - progressBar.setVisibility(View.GONE); + progressBar.setVisibility(View.INVISIBLE); } if(media.isCurrentlyPlaying()) { diff --git a/app/src/main/res/layout/downloaded_episodeslist_item.xml b/app/src/main/res/layout/downloaded_episodeslist_item.xml index 760b6b9db..770b88c7e 100644 --- a/app/src/main/res/layout/downloaded_episodeslist_item.xml +++ b/app/src/main/res/layout/downloaded_episodeslist_item.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> - <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="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:orientation="horizontal" tools:background="@android:color/darker_gray"> @@ -18,64 +17,68 @@ android:contentDescription="@string/cover_label" android:scaleType="centerCrop" tools:src="@drawable/ic_stat_antenna_default" - tools:background="@android:color/holo_green_dark" /> + tools:background="@android:color/holo_green_dark"/> + - <RelativeLayout + <LinearLayout android:layout_width="0dp" - android:layout_height="@dimen/thumbnail_length_downloaded_item" + android:layout_height="wrap_content" android:layout_marginLeft="@dimen/listitem_threeline_textleftpadding" android:layout_marginRight="@dimen/listitem_threeline_textrightpadding" android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" + android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding" android:layout_weight="1" + android:orientation="vertical" tools:background="@android:color/holo_red_dark"> <TextView android:id="@+id/txtvTitle" style="@style/AntennaPod.TextView.ListItemPrimaryTitle" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:layout_centerVertical="true" android:layout_marginBottom="4dp" tools:text="Downloaded episode title" - tools:background="@android:color/holo_green_dark" /> + tools:background="@android:color/holo_green_dark"/> - <TextView - android:id="@+id/txtvSize" - style="@style/AntennaPod.TextView.ListItemSecondaryTitle" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentBottom="true" - tools:text="23 MB" - tools:background="@android:color/holo_green_dark" /> + tools:background="@android:color/holo_red_dark" > - <TextView - android:id="@+id/txtvPublished" - style="@style/AntennaPod.TextView.ListItemSecondaryTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_alignParentBottom="true" - android:layout_marginLeft="8dp" - tools:text="Jan 23" - tools:background="@android:color/holo_green_dark" /> + <TextView + android:id="@+id/txtvSize" + style="@style/AntennaPod.TextView.ListItemSecondaryTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:text="23 MB" + tools:background="@android:color/holo_green_dark"/> + + <View + android:layout_width="0dip" + android:layout_height="1dip" + android:layout_weight="1" /> + + <ImageView + android:id="@+id/imgvInPlaylist" + android:layout_width="@dimen/enc_icons_size" + android:layout_height="@dimen/enc_icons_size" + android:contentDescription="@string/in_queue_label" + android:src="?attr/stat_playlist" + android:visibility="visible" + tools:src="@drawable/ic_list_white_24dp" + tools:background="@android:color/holo_red_light"/> - <ImageView - android:id="@+id/imgvInPlaylist" - android:layout_width="@dimen/enc_icons_size" - android:layout_height="@dimen/enc_icons_size" - android:layout_toLeftOf="@id/txtvPublished" - android:layout_alignParentBottom="true" - android:contentDescription="@string/in_queue_label" - android:src="?attr/stat_playlist" - android:visibility="visible" - tools:src="@drawable/ic_list_white_24dp" - tools:background="@android:color/holo_red_light" /> + <TextView + android:id="@+id/txtvPublished" + style="@style/AntennaPod.TextView.ListItemSecondaryTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="8dp" + tools:text="Jan 23" + tools:background="@android:color/holo_green_dark"/> - </RelativeLayout> + </LinearLayout> + </LinearLayout> <include layout="@layout/vertical_list_divider"/> diff --git a/app/src/main/res/layout/downloadlist_item.xml b/app/src/main/res/layout/downloadlist_item.xml index e7694502b..97f3ac1a1 100644 --- a/app/src/main/res/layout/downloadlist_item.xml +++ b/app/src/main/res/layout/downloadlist_item.xml @@ -2,13 +2,13 @@ <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="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:orientation="horizontal" tools:background="@android:color/darker_gray"> <LinearLayout android:layout_width="0dp" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> diff --git a/app/src/main/res/layout/downloadlog_item.xml b/app/src/main/res/layout/downloadlog_item.xml index 7b4773bca..27b179f4e 100644 --- a/app/src/main/res/layout/downloadlog_item.xml +++ b/app/src/main/res/layout/downloadlog_item.xml @@ -12,8 +12,8 @@ <com.joanzapata.iconify.widget.IconTextView android:id="@+id/txtvIcon" - android:layout_width="48dp" - android:layout_height="48dp" + android:layout_width="48sp" + android:layout_height="48sp" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:textSize="48sp" diff --git a/app/src/main/res/layout/feeditemlist_item.xml b/app/src/main/res/layout/feeditemlist_item.xml index d2b85e7df..5a2f091ec 100644 --- a/app/src/main/res/layout/feeditemlist_item.xml +++ b/app/src/main/res/layout/feeditemlist_item.xml @@ -5,7 +5,7 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" - android:layout_height="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:orientation="horizontal" tools:background="@android:color/darker_gray"> @@ -14,6 +14,8 @@ android:layout_height="match_parent" android:layout_marginLeft="@dimen/listitem_threeline_horizontalpadding" android:layout_weight="1" + android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" + android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding" tools:background="@android:color/holo_orange_dark"> <TextView @@ -23,7 +25,6 @@ android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" - android:layout_marginTop="16dp" android:layout_marginLeft="8dp" android:layout_marginRight="8dp" tools:text="NEW" @@ -36,8 +37,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" - android:layout_marginBottom="8dp" - android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" + android:layout_marginBottom="4dp" android:layout_toLeftOf="@id/statusUnread" tools:text="Episode title" tools:background="@android:color/holo_green_dark" /> @@ -101,8 +101,7 @@ tools:background="@android:color/holo_blue_light" android:max="100" android:progress="42" - android:indeterminate="false" - /> + android:indeterminate="false" /> </RelativeLayout> diff --git a/app/src/main/res/layout/mediaplayerinfo_activity.xml b/app/src/main/res/layout/mediaplayerinfo_activity.xml index 0f68b503e..64738eb45 100644 --- a/app/src/main/res/layout/mediaplayerinfo_activity.xml +++ b/app/src/main/res/layout/mediaplayerinfo_activity.xml @@ -152,6 +152,7 @@ android:src="?attr/av_fast_forward" android:textSize="@dimen/text_size_medium" android:textAllCaps="false" + android:maxLines="1" tools:visibility="gone" tools:background="@android:color/holo_green_dark" /> diff --git a/app/src/main/res/layout/new_episodes_listitem.xml b/app/src/main/res/layout/new_episodes_listitem.xml index 944711aec..d533ee642 100644 --- a/app/src/main/res/layout/new_episodes_listitem.xml +++ b/app/src/main/res/layout/new_episodes_listitem.xml @@ -10,10 +10,11 @@ <LinearLayout android:id="@+id/content" android:layout_width="match_parent" - android:layout_height="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" android:orientation="horizontal" - tools:background="@android:color/darker_gray"> + tools:background="@android:color/darker_gray" + android:gravity="center_vertical"> <RelativeLayout android:layout_width="wrap_content" @@ -48,7 +49,7 @@ <RelativeLayout android:layout_width="0dp" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding" android:layout_marginLeft="@dimen/listitem_threeline_textleftpadding" android:layout_marginRight="@dimen/listitem_threeline_textrightpadding" @@ -120,11 +121,10 @@ <ProgressBar android:id="@+id/pbar_progress" - style="?android:attr/progressBarStyleHorizontal" + style="?attr/progressBarTheme" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="4dp" android:layout_below="@id/txtvDuration" - android:layout_marginTop="-2dp" android:max="100" /> </RelativeLayout> diff --git a/app/src/main/res/layout/queue_listitem.xml b/app/src/main/res/layout/queue_listitem.xml index 8de80e355..7d18b386d 100644 --- a/app/src/main/res/layout/queue_listitem.xml +++ b/app/src/main/res/layout/queue_listitem.xml @@ -9,7 +9,7 @@ <LinearLayout android:layout_width="match_parent" - android:layout_height="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" android:orientation="horizontal" android:gravity="center_vertical" @@ -122,11 +122,10 @@ <ProgressBar android:id="@+id/progressBar" - style="?android:attr/progressBarStyleHorizontal" + style="?attr/progressBarTheme" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="4dp" android:layout_below="@id/txtvProgressLeft" - android:layout_marginTop="-2dp" android:max="100" tools:background="@android:color/holo_blue_light" /> diff --git a/app/src/main/res/layout/searchlist_item.xml b/app/src/main/res/layout/searchlist_item.xml index a8b8e7b62..83ba39cd5 100644 --- a/app/src/main/res/layout/searchlist_item.xml +++ b/app/src/main/res/layout/searchlist_item.xml @@ -2,8 +2,10 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="@dimen/listitem_threeline_height" - tools:background="@android:color/darker_gray"> + android:layout_height="wrap_content" + tools:background="@android:color/darker_gray" + android:paddingTop="@dimen/listitem_threeline_verticalpadding" + android:paddingBottom="@dimen/listitem_threeline_verticalpadding"> <ImageView android:id="@+id/imgvFeedimage" @@ -11,9 +13,7 @@ android:layout_height="@dimen/thumbnail_length_itemlist" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding" android:layout_marginLeft="@dimen/listitem_threeline_horizontalpadding" - android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" android:contentDescription="@string/cover_label" android:scaleType="centerCrop" tools:src="@drawable/ic_stat_antenna_default" @@ -24,7 +24,6 @@ android:layout_height="match_parent" android:layout_marginLeft="@dimen/listitem_iconwithtext_textleftpadding" android:layout_marginRight="@dimen/listitem_threeline_verticalpadding" - android:layout_marginTop="@dimen/listitem_threeline_verticalpadding" android:layout_toRightOf="@id/imgvFeedimage" android:orientation="vertical" tools:background="@android:color/holo_red_dark"> diff --git a/app/src/main/res/layout/simplechapter_item.xml b/app/src/main/res/layout/simplechapter_item.xml index 21bbc9545..28cdb08c3 100644 --- a/app/src/main/res/layout/simplechapter_item.xml +++ b/app/src/main/res/layout/simplechapter_item.xml @@ -2,7 +2,7 @@ <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="@dimen/listitem_threeline_height" + android:layout_height="wrap_content" android:orientation="horizontal" tools:background="@android:color/darker_gray"> |