An android library that provides new size unit - (scalable sp). This size unit scales with the screen size. It can help to developers with supporting multiple screens. This library support screens from 300dpi to 1080dpi.
Use it carefully! for example, in most cases you still need to design a different layout for tablets. But this library, already support to tablets. Just you should test and check it for every screen.
Here is a single layout built using SP Unit And Here is the same layout built using dp
Add it in your root build.gradle at the end of repositories:
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
To add SP Unit to your project (Using Android Studio and Gradle):
dependencies {
implementation 'com.github.webilisim:sp-unit:1.0.1'
}
Check the sp_example.xml to see how to have to use this library.