Version 0.9.1 comes with a brand new Window Flags plugin and Code Generator module. There are now 11 plugins available in FAST SDK:
- View Inspector
- Resource Explorer
- Crash Info
- SharedPreferences Editor
- Network Inspector
- File Explorer
- Restart Options
- Window Flags
Please visit the wiki for instructions about adding it to your project.
New Window Flags plugin
Who never got a headache trying to figure out how to:
- Make a fullscreen (or immersive or Lean back) activity
- Make the status bar or navigation translucent
- Change the status bar or navigation bar background color
- Set the right association of Window flags to get the desired behavior for an Activity/Dialog
- A mix of the previous statements
Well, fear no more because the Window Flags plugin is here to help you sort this out quickly!
Status and nav bars customization
The status and navigation bars are usually themed via the Application theme or a custom Activity theme.
But when you need to customize the status bar or navigation bar programmatically, things can get a little harder.
Thanks to our “Status bar” and “Navigation bar” sections, you will be able to quickly change background colors, test different possible combinations, along with other Window properties listed in the next sections.
Managing Notch devices
Notches became a trend not so long ago. Not sure if it’s going to last. Nevertheless, Android has different behavior for screens presenting a notch when it comes to full-screen capabilities.
Thanks to our “Cutout mode” section, you will be able to easily switch between Android modes for notched devices.
Do you need to set up some flags on activity?.window?.decorView?.systemUiVisibility (or activity.getWindow().getDecorView().setSystemUiVisibility() for Java devs) ?
It might seem simple enough when you find the code on StackOverflow but you usually end up testing multiple flag combinations to get the desired behavior.
Thanks to our “View flags” section, you will be able to test whatever flag combination you want very quickly.
Do you need to set up some flags on activity?.window?.addFlags() (or activity.getWindow().addFlags() for Java devs) ?
Well, we have the same section as “View flags” but for Window.addFlags(). It’s the “WindowManager.LayoutParams.flags” section.
We included a few predefined sets of flags to help you get common desired behaviors.
So far, we have added the following preselections:
- Light status bar
- Dark status bar
- Lean back mode
- Immersive mode
- Immersive sticky mode
New Code Generator module
If you’ve read the last SDK update blog post, you know that we were really excited about the upcoming Code Generator module. Well, it’s now available through the Window Flags plugin!
As you can see on the screenshot above, we are now able to provide code snippets that are base on the options that you have selected in the Window Flags panel. Just click on the “code” button (the HTML end tag-like icon), and you will see the appropriate code snippets.
We declined our snippets in Java and Kotlin. Even though Kotlin is now the default standard language for Android development, we know that not everyone made the jump from Java to Kotlin yet.
What’s great in the Code Generator feature is that we are able to display syntax highlighted code in Java, Kotlin, XML, JSON, and HTML.
Another great, time-saving feature is the “Copy” button on each Code snippet section. If you are using an emulator, you can click on the Copy button and paste directly your code in Android Studio (or your favorite IDE or text editor).
We will try our best to provide useful code snippets in the other plugins, as well as in the future ones.
We’re convinced that the Code Generator feature will play a big role in the Framework to help you guys daily.
New Keyboard shortcuts
Last but not least, we’ve added two new keyboard shortcuts to improve the navigation between plugins.
The backspace will allow you to quickly close the current panel, while the space bar will simply close every panel from any FAST SDK plugin.
We were annoyed because these two shortcuts were not available, so we thought it would be a good idea to add them so that you guys can also enjoy them.