Announcement

An App Layout for Every Device: Join Hands to Welcome our new Android Plugin (PxToDp Converter), Full Tilt

logo

DhiWise

March 15, 2022
image
Author
logo

DhiWise

{
March 15, 2022
}

Hello Developer, have you been using our Constraint Layout feature while designing the perfect UI for your Android application? As much as it warms our heart to see your position UI components and design elements using the GUI-powered Android Builder alone, we believe sizing the layout dynamically continues to be a struggle.

Well, not anymore, as our new Android Plugin is finally in the house—allowing you to get hold of the most responsive UIs—irrespective of the device running the application in the first place. Known as DhiWise ‘PxToDp converter’, this plugin is a one-stop solution to automatically scale UIs to fit every gadget in plain sight.

Why do you need this Plugin?

There are android smartphones. And then there are Android tablets. Wait, there are android 2-in-1 devices as well. Multiple devices—multiple orientations. And a static UI that doesn’t scale isn’t going to cut it for you. But what are the solutions? 

Well, you stick to the DP (Design Independent Pixel) method of designing the UI. The UI stays static and looks the best on any one type of Android device, say the ‘Smartphones.’ The moment you plan on using the app elsewhere, say on a tablet, the UI starts acting up and looks painfully underwhelming.

Or, you can rely on a specific android library while coding to get hold of SDP or (Scalable DP). This approach will allow the UI to scale up/down, depending on the screen size. 

But what if there was a third way? A way that’s exclusive to DhiWise. The PxToDp converter doesn’t only change the code-view depending on the changing size. Instead, it generates ‘Dimension files’ in XML to ensure that you always have a responsive UI code at your disposal.

How Does the PxToDp converter Work?

Don’t sweat over it, as DhiWise PxToDp converter is simpler than you could imagine. To illustrate the seamlessness further, here are some easy steps to follow:

  • Simply download and install the plugin. 
  • Head over to the IDE where you are preparing the app code and select the ‘Res’ folder
Image
  • Opt for the PxToDp plugin from the drop-down.
  • Once open, add the preferred viewport width and height for the screens you want to app to scale for.
Image
  • Once the inputs are fed in, and you hit generate, the PxToDp converter creates separate dimension files.
  • Generate multiple ‘Dimes’ files depending on the number of device variants you want the app to cater to.

Purpose

The PxToDp converter takes the concept of pixel-based scaling out of the equation, which ensures that the design elements are scaled without issues and any drop in quality. The plugin doesn’t force the changes directly into the code by keeping the scope open for variables. Unlike a standard SDP (which acts as a standard and scalable size unit, unlike the DP) implementation that needs you to build a dependency block, the PxToDp converter lets you handle scaling directly from the IDE.

You simply need to install the plugin. Once done, you can scale any UI depending on the screen size within seconds.

Android App Developed: Simplified Further

DhiWise PxToDp converter aims to cut out the redundancies and limitations of developing full-fledged Android applications. Now make sure that your app interface— including the dashboard, splash screen, and more—looks good on every device without getting into technicalities.