aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java18
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java18
3 files changed, 3 insertions, 35 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java
index 9a6f765a..43462cc5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java
@@ -281,7 +281,7 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
int navBarHeight = getNavBarHeight();
if (navBarHeight > 0) {
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
- params.bottomMargin = navBarHeight;
+ params.bottomMargin += navBarHeight;
fab.setLayoutParams(params);
mRecyclerView.setPadding(0, 0, 0, navBarHeight + mRecyclerView.getPaddingBottom());
showToast = true;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
index c23e310e..1316dfc1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
@@ -4,16 +4,13 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
-import android.graphics.Point;
import android.os.Build;
import android.os.Bundle;
-import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
@@ -265,20 +262,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
params.bottomMargin += navBarHeight;
fab.setLayoutParams(params);
- coordinatorLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
- @Override
- public void onGlobalLayout() {
- coordinatorLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
-
- Display display = getWindowManager().getDefaultDisplay();
- Point size = new Point();
- display.getRealSize(size);
- if (size.y == coordinatorLayout.getHeight()) {
- linearLayoutBottomAppBar.setPadding(0,
- linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
- }
- }
- });
+ bottomNavigationView.setPadding(0, 0, 0, navBarHeight);
}
showToast = true;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
index 53c5ace1..579afc03 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
@@ -5,18 +5,15 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.content.res.Resources;
-import android.graphics.Point;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
-import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
@@ -304,20 +301,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
params.bottomMargin += navBarHeight;
fab.setLayoutParams(params);
- coordinatorLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
- @Override
- public void onGlobalLayout() {
- coordinatorLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
-
- Display display = getWindowManager().getDefaultDisplay();
- Point size = new Point();
- display.getRealSize(size);
- if (size.y == coordinatorLayout.getHeight()) {
- linearLayoutBottomAppBar.setPadding(0,
- linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
- }
- }
- });
+ bottomNavigationView.setPadding(0, 0, 0, navBarHeight);
}
showToast = true;
}