It all started back in 2020 when we suddenly had to start working from home (we all know the cause). At the time I was working on LEGOLife, an app supporting both phone and tablet form factors. In our office, we had access to tablets, but most of us didn't have any at home which turned out to be a problem quite quickly as we had to ensure our code changes in LEGOLife looked great on both form factors.
I started relying even more on a handy Android developer tool (present on all Android devices) called "Smallest width" to toggle between the two modes:
Phone (Pixel 1): 411dp for Pixel 1
Tablet: tablets start at sw600dp, so any value >= would turn your device into a tablet
Even though this tool was and is working just fine, it became cumbersome so I was thinking how could I achieve the same with just a simple click of a button, preferably inside the IDE. That's when I started looking into the JetBrains Platform SDK and after reading the following:
*One of the best ways to contribute a larger piece of code, adding extra functionality to IntelliJ IDEA, is by writing a plugin. (*source: https://www.jetbrains.com/opensource/idea/)
I decided to develop my own plugin.
Fast forward to June 2020, after using it for some time and gathering feedback from Péter Pandula (thanks a ton mate) I decided to launch it on the JetBrains Marketplace: Android Form Factor Toggler 🎉.
My colleagues and I have been using it since and it turned out to be quite a handy tool. I'm kindly asking you to give it a try and possibly share your feedback. Thank you 🙂
PPS Note that Android Studio Electric Eel brings the superb Resizable Emulator 🎉! It requires you to have a specific emulator compared to Android Form Factor Toggler which can toggle real devices as well. Choose whichever suits you best!