Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/dhiwise/pxtodpconverter
- Owner: DhiWise
- License: mit
- Created: 2021-12-09T10:01:46.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-07T08:19:16.000Z (about 2 years ago)
- Last Synced: 2024-04-24T06:09:53.147Z (8 months ago)
- Topics: android, dp, kotlin, kotlin-android, plugin, px, xml
- Language: Kotlin
- Homepage:
- Size: 632 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
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" /> |