Git Product home page Git Product logo

Comments (4)

chrisbanes avatar chrisbanes commented on May 22, 2024

Depends what you mean by work. Inset handling on KitKat and below is rarely needed, so it gracefully ignores.

What do you need to happen on KitKat and below?

from insetter.

 avatar commented on May 22, 2024

Thank you for your reply.

My English is not very good, and I may not express it well.

The "work" I mean is when I enable drawing behind the navigation bar with View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags, and use Insetter.setOnApplyInsetsListener() method to add padding to views, whether their content will not be displayed behind the navigation bar on KitKat and below.

My project's minSDKVersion is 19 now, I am also wondering if I need to upgrade it to 21.

from insetter.

chrisbanes avatar chrisbanes commented on May 22, 2024

On KitKat, the only way to draw behind the status is by using the android:windowTranslucentNavigation and android:windowTranslucentStatus attributes in your theme. Generally apps should avoid these and use android:statusBarColor, etc available in API 21 instead.

At the same time, Insetter relies on WindowInsetsCompat, which only works on API 21+ (you can use it before API 21 fine, but it doesn't do anything). I'm afraid the effort to support KitKat is too much to make it worth it.

So summary, you can safely keep your minSdkVersion as 19, but only draw behind the status bar on API 21+.

from insetter.

 avatar commented on May 22, 2024

Ok, thank you!

from insetter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.