Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dhiwise/pxtodpconverter

PxToDp converter creates dimension files to make your UI responsive across all the devices. Simply Input the width and height of your app screen design, and have your responsive UI work on any phone and tablet within seconds.
https://github.com/dhiwise/pxtodpconverter

android dp kotlin kotlin-android plugin px xml

Last synced: 30 days ago
JSON representation

PxToDp converter creates dimension files to make your UI responsive across all the devices. Simply Input the width and height of your app screen design, and have your responsive UI work on any phone and tablet within seconds.

Awesome Lists containing this project

README

        

## PxToDp Converter
A more advanced alternative of SDP - a scalable size unit.

PxToDp converter creates dimension files to make your UI responsive across all the devices. Simply Input the width and height of your app screen design, and have your responsive UI work on any phone and tablet within seconds.
## How does it work?
PxToDp converter's advanced algorithm auto generates the required responsive UI framework according to developers requirements.
- Right click on Res folder then select PxToDp plugin

![PxToDp Converter](screenshot/pxtodp.gif)

- In the PxToDp converter, input your app frame design viewport width and height.

![PxToDp Converter](screenshot/img_pxtodp.png)

- Taking your input, our Responsive PxToDp converter will create the dimes xml file.
- The file will have required inputs for pxh (pixel horizontally) and pxv (pixel vertically).
- All the mobile design dimes xml files will be generated in your code.

## Example

| Your regular design xml file (DP/SP/PX) | Integration of pxh & pxv in your code(PxToDp converter) |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| android:id="@+id/txtSkip"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="end"android:layout_marginStart="32dp"android:layout_marginTop="66dp"android:layout_marginEnd="32dp"android:alpha="0.4"android:gravity="center"android:text="Skip" /> | android:id="@+id/txtSkip"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="end"android:layout_marginStart="@dimen/_32pxh"android:layout_marginTop="@dimen/_66pxv"android:layout_marginEnd="@dimen/_32pxh"android:alpha="0.4"android:gravity="center"android:text="Skip" /> |