When supporting different screen sizes (densities) in Android often the focus is on creating different layouts for every possible screen. I.E.
There are nice libraries which will handle everything and reduce your pain. For using it, just add two dependencies in gradle:
implementation 'com.intuit.ssp:ssp-android:1.0.5'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
After that, use dimens
like this:
android:layout_marginTop="@dimen/_80sdp"