question

tg avatar image
tg asked ·

Hiding System Bar

Previously weve been able to hide the System Bar (Back button, home button etc.) using

<integer name="CLOVER_CUSTOMER_UI_VISIBILITY">0x10000000</integer>

as described here. This does not seem to work anymore and the System bar remains. What is the best practice to hide the system bar as shown in Clover's own applications' customer facing mode?

Customers
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Mike M avatar image
Mike M answered ·

The best practice for hiding the system bar is by utilizing setSystemUiVisibility(), and immersive sticky is the standard Android route.

From our CustomerFacingTenderActivity example:

public void setSystemUiVisibility() {
        getWindow().getDecorView().setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LOW_PROFILE
                        | View.SYSTEM_UI_FLAG_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}

We've also added CustomerMode.java to our SDK as a utility, however it is only applicable to Clover Mobile/Mini. This Customer Facing mode will disable the swipe interaction that can temporarily show the system bar.

1 comment Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@mike, I am working on a project that targets Clover Stations which is running on 4.2.2. Do you have any suggestions for workarounds ?

0 Likes 0 · ·

Welcome to the
Clover Developer Community