question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improvements in Insetter

See original GitHub issue
  1. Very often with applying insets via doOnApplyWindowInsets using set content edge-to-edge. It would be nice to add a function like this:
inline fun View.setEdgeToEdgeContent() {
    if (ViewCompat.getFitsSystemWindows(this)) {
        systemUiVisibility =
                // Tells the system that you wish to be laid out
                // as if the navigation bar was hidden
            View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
                    // Optional, if we want you be laid out fullscreen,
                    // behind the status bar
                    View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
                    // Tells the system that you wish to be laid out at
                    // the most extreme scenario of any other flags
                    View.SYSTEM_UI_FLAG_LAYOUT_STABLE
    }
}
  1. Also it would be nice make constructors in ViewState and ViewDimensions public to allow usage in customs options, like where need return consumed or modified insets.

  2. And also it would be nice provide opportunities to return modified insets, like this usecase:
    https://github.com/google/iosched/blob/4054aa3f8934b8b1208d5823fdbf531a8eb367af/mobile/src/main/java/com/google/samples/apps/iosched/ui/MainActivity.kt#L154

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisbanescommented, Oct 30, 2019

Thanks!

The first is now done and will be out in v0.2.0. We now have: View.setEdgeToEdgeSystemUiFlags(...) in ktx, app:layout_edgeToEdge in dbx and a method on Insetter

I need to think more about the second and third option request. I’ve split this out into #23 for now.

0reactions
ghostcommented, Nov 12, 2019

That’s also true. Thanks one more time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Insetter - Chris Banes
Insetter is a library to help make handling WindowInsets easy. ... View binding + improvements to the main library mean that it now...
Read more >
Chris Banes al Twitter: "@RunIhorRun Insetter uses a different ...
Insetter v0.3.0 was released earlier today! Lots of improvements in this release, including a brand new API, to make handling WindowInsets even easier....
Read more >
Releases · chrisbanes/insetter - GitHub
Insetter now fully supports the new recent API improvements to WindowInsets . We use the backported functionality available in AndroidX Core ...
Read more >
Gutenberg 14.4 Introduces Distraction-Free Mode, Redesigns ...
This distraction-free mode is a monumental improvement over the days ... Another major update in 14.4 is the redesigned pattern inserter.
Read more >
Core Editor Improvement: Drag & Drop Blocks and Patterns ...
Here's a quick video showing how it's done for both blocks and block patterns: Video showing drag & drop from the inserter for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found