Search

changing status bar color in sketchware.


Earlier code injection method was required for changing status bar color in sketchware. But now in newer versions of sketchware it can easily be done using add source directly block.

To change the status bar color in sketchware project, insert add source directly block in onCreate event in LOGIC of the project, and then write the following code.

Window w = this.getWindow();
w.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); w.setStatusBarColor(Color.parseColor("#000000"));







Change the hex color code in last line of the code as per the requirement. It will change color of status bar to the color code provided in the code above.

This code has to be used on each screen of the app.

Post a Comment

0 Comments