AutoAdjustDimens - Dynamically auto adjust the sizes of dimension supporting multiple screens sizes.

Overview

Logo

Auto Adjust Scalable Dimension Library

Platform API Download

Twitter Codacy Badge

This is an Android library allowing to auto adjust the density and scale pixels.

USAGE

To use this library in your project Using Android Studio and Gradle:

implementation 'com.auto.adjust:dimens:1.0.9'

XML

android:layout_width="@dimen/_100adp"
         
android:layout_height="@dimen/_100adp"
         
android:padding="@dimen/_8adp"
         
android:margin="@dimen/_8adp"

android:textSize="@dimen/_11asp"

You must use the following properties in your XML.

Properties Descriptions
@dimen/_100adp For positive dimens
@dimen/_100_minus_adp For negative dimens
@dimen/_11asp For text sizes

KOTLIN

resources.getDimensionPixelSize(R.dimen._100adp)
resources.getDimensionPixelSize(R.dimen._11asp)

JAVA

getResources().getDimensionPixelOffset(R.dimen._100adp);
getResources().getDimensionPixelOffset(R.dimen._11asp);

COMPARISION

+---------+-------------+---------------+-------------+--------------------+
| Unit    | Description | Units Per     | Density     | Same Physical Size |
|         |             | Physical Inch | Independent | On Every Screen    |
+---------+-------------+---------------+-------------+--------------------+
| px      | Pixels      | Varies        | No          | No                 |
+---------+-------------+---------------+-------------+--------------------+
| in      | Inches      | 1             | Yes         | Yes                |
+---------+-------------+---------------+-------------+--------------------+
| mm      | Millimeters | 25.4          | Yes         | Yes                |
+---------+-------------+---------------+-------------+--------------------+
| pt      | Points      | 72            | Yes         | Yes                |
+---------+-------------+---------------+-------------+--------------------+
| dp      | Density     | ~160          | Yes         | No                 |
|         | Independent |               |             |                    |
|         | Pixels      |               |             |                    |
+---------+-------------+---------------+-------------+--------------------+
| sp      | Scale       | ~160          | Yes         | No                 |
|         | Independent |               |             |                    |
|         | Pixels      |               |             |                    |
+---------+-------------+---------------+-------------+--------------------+
| adp     | Auto        | ~160          | Yes         | Yes                |
|         | Density     |               |             |                    |
|         | Independent |               |             |                    |
|         | Pixels      |               |             |                    |
+---------+-------------+---------------+-------------+--------------------+
| asp     | Auto        | ~160          | Yes         | Yes                |
|         | Scale       |               |             |                    |
|         | Independent |               |             |                    |
|         | Pixels      |               |             |                    |
+---------+-------------+---------------+-------------+--------------------+

More info can be also be found in the Google Design Documentation.

LIMITATION

Use it carefully! for example, in most cases you still need to design a different layout for tablets.

SUPPORT ❤️

Find this library useful? Support it by joining stargazers for this repository ⭐️
And follow me for my next creations 👍

LICENCE

Auto Adjust Dimension Android Kotlin Library by Aman Jham is licensed under a Apache License 2.0.

You might also like...
This application is used to adjust the scaling of kubernetes deployments depending on the message-count of given RabbitMQ queues.

PodAutoScaler This application is used to adjust the scaling of kubernetes deployments depending on the message-count of given RabbitMQ queues. It use

A cli tool that helps signing and zip aligning single or multiple Android application packages (APKs) with either debug or provided release certificates. It supports v1, v2 and v3 Android signing scheme has an embedded debug keystore and auto verifies after signing.  🌏 Android/IDEA localization plugin. supports multiple languages and multiple translators.
🌏 Android/IDEA localization plugin. supports multiple languages and multiple translators.

English | 简体中文 AndroidLocalizePlugin 🌏 Android/IDEA localization plugin. supports multiple languages and multiple translators. Features Multiple tran

 A MaterialChipSetWidget is used to hold multiple chipsets 🤩 and each chipset has multiple values. 🔖
A MaterialChipSetWidget is used to hold multiple chipsets 🤩 and each chipset has multiple values. 🔖

A MaterialChipSetWidget is used to hold multiple chipsets 🤩 and each chipset has multiple values. 🔖

Androidicons is a professional, handcrafted icon set with 250 icons in 14 different colors and 5 sizes, including an icon font and all sources.

Android Developer Icons Android Developer Icons is a custom icon set, created by Opoloo. Included are: 250 hand-crafted, pixel-perfect icons in 5 size

💰 A library to dynamically format your EditTexts to take currency inputs
💰 A library to dynamically format your EditTexts to take currency inputs

CurrencyEditText A library to dynamically format your EditTexts to take currency inputs. Gradle Dependency Add the dependency to your app's build.grad

:speedboat: Floating navigation view for displaying a list of items dynamically on Android.
:speedboat: Floating navigation view for displaying a list of items dynamically on Android.

Submarine Fully customizable floating navigation view for listing items dynamically on Android. Including in your project Gradle Add below codes to yo

create your custom themes and change them dynamically with ripple animation
create your custom themes and change them dynamically with ripple animation

Android Animated Theme Manager create your custom themes and change them dynamically with ripple animation Features support java and kotlin projects.

CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

Learn how to create a layout that works with all screen sizes of the device.

Learn how to create a layout that works with all screen sizes of the device.

Adding locale aware thousands separator dynamically as the user types

Locale aware, dynamic thousands separator for EditText Adding locale aware thousands separator dynamically as the user types Features: Add thousands s

If you have trouble pinning your custom icon to Launcher dynamically, try this library

CustomIconHelperX If you have trouble pinning your custom icon to Launcher dynam

BungeePluginManagerPlus - Dynamically manage your BungeeCord plugins

BungeePluginManagerPlus A plugin for BungeeCord / Waterfall that allows you to m

Handy states for dynamically obtained data.

Resource Handy states for dynamically obtained data. Table of contents Problem to solve Reasons to use Artifacts resource-plain resource-context Insta

v9 is an Android library that provides the ability to dynamically resize Path objects as you would 9-patch bitmaps

v9 is an Android library that provides the ability to dynamically resize Path objects as you would 9-patch bitmaps. In the example below, the chat bubble is dynamically resized while preserving the corners:

A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential
A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential

ComposeCookBook Declarative UI A Collection of all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential. Jetpack Compo

Epoxy is an Android library for building complex screens in a RecyclerView

Epoxy Epoxy is an Android library for building complex screens in a RecyclerView. Models are automatically generated from custom views or databinding

Epoxy is an Android library for building complex screens in a RecyclerView

Epoxy Epoxy is an Android library for building complex screens in a RecyclerView. Models are automatically generated from custom views or databinding

Preference via delegates (Flow, Coroutines) + JetPack DataStore Storage + DSL for RecyclerView based preference screens
Preference via delegates (Flow, Coroutines) + JetPack DataStore Storage + DSL for RecyclerView based preference screens

Preference via delegates (Flow, Coroutines) + JetPack DataStore Storage + DSL for RecyclerView based preference screens

Releases(asp)
Owner
Aman Jham
Aman Jham
Adding locale aware thousands separator dynamically as the user types

Locale aware, dynamic thousands separator for EditText Adding locale aware thousands separator dynamically as the user types Features: Add thousands s

Abhilash Dhondalkar 0 Oct 3, 2021
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

AutoscaleEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. Latest Version How to use

Txus Ballesteros 354 Nov 28, 2022
Simple extension for account suggestion and auto completion.

AccountAutoCompleteEditText Just a simple implementation for use of auto complete text view with device account suggestion Usage Just simply put an cu

Keishin Yokomaku 100 Feb 22, 2022
Awesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter or Facebook.

android-typeahead Awesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter

Arab Agile 11 Jun 4, 2019
An Android TextView that always displays an auto refreshing relative time span with respect to a reference time

android-ago This library provides RelativeTimeTextView, a custom TextView that takes a reference time and always displays the relative time with respe

Kiran Rao 658 Dec 21, 2022
Xdimen - Support multiple screen sizes easily by scaling your dimensions

Support multiple screen sizes easily by scaling your dimensions. How does Xdimen work? When you have a UI design with a specific dimension, and

Islam Khaled 38 Dec 8, 2022
Slider-Gallery-Zoom: image slider for android supporting indicator and auto scroll with clicking on image

image slider supporting indicator and auto scroll with clicking on image to open full screen image slider swipe and pinch zoom gestures like gallery,just pass your images and the position of the current image.

Mahmoud Elian 3 May 28, 2022
LiveData 数据倒灌:别问,问就是不可预期 - Perfect alternative to SingleLiveEvent, supporting multiple observers.

前言 大家好,我是《Jetpack MVVM Best Practice》作者 KunMinX。 今天提到的 “数据倒灌” 一词,缘于我为了方便理解和记忆 “页面在 ‘二进宫’ 时收到旧数据推送” 的情况,而在 2019 年 自创并在网上传播的 关于此类现象的概括。 它主要发生在:通过 Shared

KunMinX 924 Jan 5, 2023
Provides a set of views which allows to adjust the spacing between the characters of that view, AKA, Kerning effect.

KerningViews KerningViews provides a set of views (currently only TextView and Button) which lets you adjust the spacing between the characters in the

Aritra Roy 148 Aug 7, 2022