diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-11-21 21:03:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-21 21:03:32 +0100 |
commit | 071a6111269c7c0168fe348efa16977911d42786 (patch) | |
tree | 1eb47e42fbb98d8a3be7f3eb642d272e82c6189f | |
parent | 473ba14f88a7df6edfa51d3ecc9e1f913ee6d6f0 (diff) | |
parent | cd577c534622ef84a8a23e9c74498b0d4e0d45e0 (diff) | |
download | AntennaPod-071a6111269c7c0168fe348efa16977911d42786.zip |
Merge pull request #5564 from ByteHamster/fix-stats-flash
Fix short flash of long stats table when showing short one
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/FeedStatisticsFragment.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedStatisticsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedStatisticsFragment.java index f4e6ddd50..e85c2a386 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedStatisticsFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedStatisticsFragment.java @@ -43,6 +43,16 @@ public class FeedStatisticsFragment extends Fragment { @Nullable Bundle savedInstanceState) { feedId = getArguments().getLong(EXTRA_FEED_ID); viewBinding = FeedStatisticsBinding.inflate(inflater); + + if (!getArguments().getBoolean(EXTRA_DETAILED)) { + for (int i = 0; i < viewBinding.getRoot().getChildCount(); i++) { + View child = viewBinding.getRoot().getChildAt(i); + if ("detailed".equals(child.getTag())) { + child.setVisibility(View.GONE); + } + } + } + loadStatistics(); return viewBinding.getRoot(); } @@ -71,15 +81,6 @@ public class FeedStatisticsFragment extends Fragment { viewBinding.totalDurationLabel.setText(Converter.shortLocalizedDuration(getContext(), s.time)); viewBinding.onDeviceLabel.setText(String.format(Locale.getDefault(), "%d", s.episodesDownloadCount)); viewBinding.spaceUsedLabel.setText(Formatter.formatShortFileSize(getContext(), s.totalDownloadSize)); - - if (!getArguments().getBoolean(EXTRA_DETAILED)) { - for (int i = 0; i < viewBinding.getRoot().getChildCount(); i++) { - View child = viewBinding.getRoot().getChildAt(i); - if ("detailed".equals(child.getTag())) { - child.setVisibility(View.GONE); - } - } - } } @Override |