craigsamj-stack commented on issue #260:
URL: 
https://github.com/apache/cordova-plugin-statusbar/issues/260#issuecomment-3435423917

   Below code worked for me. Try it once.
   
   Add the below code to all activities OnCreate event. Place it after setting 
the layout code like setContentView(R.layout.mainactivity)
   
   
                        if (Build.VERSION.SDK_INT >= 
Build.VERSION_CODES.VANILLA_ICE_CREAM) {
   
                                View rootView = 
getWindow().getDecorView().getRootView();
                                
ViewCompat.setOnApplyWindowInsetsListener(rootView, (v, insets) -> {
                                        Insets bars = insets.getInsets(
                                                        
WindowInsetsCompat.Type.systemBars()
                                                                        | 
WindowInsetsCompat.Type.displayCutout()
                                        );
                                        v.setPadding(bars.left, bars.top, 
bars.right, bars.bottom);
                                        return WindowInsetsCompat.CONSUMED;
                                });
   
                        }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to