8000 Add requestLayout() call on parent view for pre 26 API level by VitaliyBelyaev · Pull Request #75 · chrisbanes/insetter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Add requestLayout() call on parent view for pre 26 API level #75

Merged
merged 2 commits into from
Sep 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions library/src/main/java/dev/chrisbanes/insetter/Insetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package dev.chrisbanes.insetter;

import android.annotation.SuppressLint;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -442,6 +443,10 @@ public void applyInsetsToView(
mlp.bottomMargin = marginBottom;
view.setLayoutParams(lp);

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
view.getParent().requestLayout();
}

if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(
TAG,
Expand Down
0