I have an app with toggles for turning translucent bars on and off, but for it to properly work it needs to have an offset value in dip units and know if the users device has software buttons. What is the best way to get to get the height of the status bar and navbar in dip units and detect if the user has software keys (if there is a navbar)?