From da8cd6bc9e94533fd28a1049965bdffaad2bd6d2 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 25 Jul 2020 19:12:13 -0400 Subject: [PATCH] v16.8 --- .../awais/instagrabber/activities/PostViewer.java | 11 +++++++++++ app/src/main/res/layout/activity_viewer.xml | 1 + fastlane/metadata/android/changelogs/33.txt | 1 + 3 files changed, 13 insertions(+) diff --git a/app/src/main/java/awais/instagrabber/activities/PostViewer.java b/app/src/main/java/awais/instagrabber/activities/PostViewer.java index 9c082955..795d9cc3 100755 --- a/app/src/main/java/awais/instagrabber/activities/PostViewer.java +++ b/app/src/main/java/awais/instagrabber/activities/PostViewer.java @@ -214,6 +214,12 @@ public final class PostViewer extends BaseLanguageActivity { if (Utils.isEmpty(settingsHelper.getString(Constants.COOKIE))) { viewerBinding.btnLike.setVisibility(View.GONE); viewerBinding.btnBookmark.setVisibility(View.GONE); + viewerBinding.postActions.setVisibility(View.GONE); + viewerBinding.postActions.setLayoutParams(new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, 0, 0 + )); + containerLayoutParams.weight = 2.2f; + viewerBinding.container.setLayoutParams(containerLayoutParams); } else { viewerBinding.btnLike.setOnClickListener(onClickListener); @@ -328,6 +334,7 @@ public final class PostViewer extends BaseLanguageActivity { LinearLayout.LayoutParams.MATCH_PARENT, 0, 0.55f )); containerLayoutParams.weight = 1.35f; + containerLayoutParams.weight += (Utils.isEmpty(settingsHelper.getString(Constants.COOKIE))) ? 0.3f : 0; viewerBinding.container.setLayoutParams(containerLayoutParams); viewerBinding.mediaList.setVisibility(View.VISIBLE); } @@ -557,6 +564,10 @@ public final class PostViewer extends BaseLanguageActivity { } lastSlidePos = slidePos; + containerLayoutParams.weight = (viewerBinding.mediaList.getVisibility() == View.VISIBLE) ? 1.35f : 1.9f; + containerLayoutParams.weight += (Utils.isEmpty(settingsHelper.getString(Constants.COOKIE))) ? 0.3f : 0; + viewerBinding.container.setLayoutParams(containerLayoutParams); + postCaption = viewerPostModel.getPostCaption(); if (Utils.hasMentions(postCaption)) { diff --git a/app/src/main/res/layout/activity_viewer.xml b/app/src/main/res/layout/activity_viewer.xml index 4d01d783..982db62d 100755 --- a/app/src/main/res/layout/activity_viewer.xml +++ b/app/src/main/res/layout/activity_viewer.xml @@ -99,6 +99,7 @@ android:layout_weight="1"/>