diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java')
3 files changed, 11 insertions, 2 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 903f2e89..2f2ca84c 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -657,6 +657,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, public TextView excerptView; public ImageView flavorImageView; public ImageView flavorVideoPlayView; + public TextView flavorImagePrompt; public TextView authorView; public TextView dateView; public CheckBox selectionBoxView; @@ -822,6 +823,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, holder.publishedView = (ImageView)v.findViewById(R.id.published); holder.excerptView = (TextView)v.findViewById(R.id.excerpt); holder.flavorImageView = (ImageView) v.findViewById(R.id.flavor_image); + holder.flavorImagePrompt = (TextView) v.findViewById(R.id.flavor_image_prompt); holder.flavorVideoPlayView = (ImageView) v.findViewById(R.id.flavor_video_play); holder.authorView = (TextView)v.findViewById(R.id.author); holder.dateView = (TextView) v.findViewById(R.id.date); @@ -881,6 +883,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (article.flavorImage == null) article.flavorImage = imgs.first(); + + article.flavorImageCount = imgs.size(); } if (holder.textImage != null) { @@ -1027,6 +1031,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, holder.flavorImageView.setVisibility(View.VISIBLE); holder.flavorImageLoadingBar.setVisibility(View.VISIBLE); holder.flavorVideoPlayView.setVisibility(View.GONE); + holder.flavorImagePrompt.setVisibility(View.GONE); boolean videoFound = false; @@ -1137,6 +1142,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (imgSrc.indexOf("//") == 0) imgSrc = "http:" + imgSrc; + if (article.flavorImageCount > 1) { + holder.flavorImagePrompt.setText(getResources().getQuantityString(R.plurals.flavor_image_prompt, article.flavorImageCount-1, article.flavorImageCount-1)); + holder.flavorImagePrompt.setVisibility(View.VISIBLE); + } + ViewCompat.setTransitionName(holder.flavorImageView, "TRANSITION:ARTICLE_IMAGES_PAGER"); holder.flavorImageView.setOnClickListener(new OnClickListener() { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index 9e12cc94..a157c059 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -458,7 +458,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis public ImageView menuButtonView; public ViewGroup flavorImageHolder; public ProgressBar flavorImageLoadingBar; - public View flavorImageArrow; public View headlineFooter; public ImageView textImage; public ImageView textChecked; @@ -577,7 +576,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis holder.menuButtonView = (ImageView) v.findViewById(R.id.article_menu_button); holder.flavorImageHolder = (ViewGroup) v.findViewById(R.id.flavorImageHolder); holder.flavorImageLoadingBar = (ProgressBar) v.findViewById(R.id.flavorImageLoadingBar); - holder.flavorImageArrow = v.findViewById(R.id.flavorImageArrow); holder.headlineFooter = v.findViewById(R.id.headline_footer); holder.textImage = (ImageView) v.findViewById(R.id.text_image); holder.textChecked = (ImageView) v.findViewById(R.id.text_checked); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java index a5032c6c..7990c55c 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java @@ -37,6 +37,7 @@ public class Article implements Parcelable { /* not serialized */ public Document articleDoc; public Element flavorImage; + public int flavorImageCount; public boolean noValidFlavorImage; public Article(Parcel in) { |