Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout.LayoutParams;
import android.widget.TextView;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -97,7 +98,12 @@ public void onCreate(Bundle icicle) {
// to calculate insets to avoid any part of the app displaying under the status bar.
ViewCompat.setOnApplyWindowInsetsListener(getWindow().getDecorView(), (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(insets.left, insets.top, insets.right, insets.bottom);
Insets ime = windowInsets.getInsets(WindowInsetsCompat.Type.ime());
v.setPadding(insets.left, insets.top, insets.right, insets.bottom + ime.bottom);

if (this instanceof Form) {
((Form)this).ReplayFormOrientation();
}

// Return CONSUMED if you don't want the window insets to keep passing
// down to descendant views.
Expand Down