Skip to content

Modified dimens for android, so app will look same in all mobile resolution and tablet using single layout file. you just need to use sdp instead of dp. for ex. instead of 1dp use @dimens/_1sdp

Notifications You must be signed in to change notification settings

bhaveshjethani/Android-Ksdp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android-Ksdp

Utility to set proper dimension across android mobile devices.

===Usage===

For ex use @dimen/_10sdp instead of hard coded 10dp and that it.

<android.support.v7.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/_10sdp" android:layout_marginTop="@dimen/_10sdp" android:fontFamily="@font/app_font_semi_bold" android:text="@string/login" android:textColor="@color/colorWhite" android:textSize="@dimen/_32ssp" />

===Implementation===

Include following in your project's build.gradle file under both repositories section

maven { url  "https://dl.bintray.com/k9428/ksdp" }

Include following in your app's build.gradle file

implementation 'lib.ksdp:ksdp:1.0.1' 

That's it!

About

Modified dimens for android, so app will look same in all mobile resolution and tablet using single layout file. you just need to use sdp instead of dp. for ex. instead of 1dp use @dimens/_1sdp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages