您必须专注于所有屏幕的设备兼容性:
add this dependency to your build.gradle
compile 'com.intuit.sdp:sdp-android:1.0.3'
for eg : dimens.xml
<dimen name="_1sdp">1.20dp</dimen>
<dimen name="_2sdp">2.40dp</dimen>
<dimen name="_3sdp">3.60dp</dimen>
<dimen name="_4sdp">4.80dp</dimen>
<dimen name="_5sdp">6.00dp</dimen>
<dimen name="_6sdp">7.20dp</dimen>
<dimen name="_7sdp">8.40dp</dimen>
<dimen name="_8sdp">9.60dp</dimen>
<dimen name="_9sdp">10.80dp</dimen>
<dimen name="_10sdp">12.00dp</dimen>
<dimen name="_11sdp">13.20dp</dimen>
<dimen name="_12sdp">14.40dp</dimen>
<dimen name="_13sdp">15.60dp</dimen>
<dimen name="_14sdp">16.80dp</dimen>
<dimen name="_15sdp">18.00dp</dimen>
<dimen name="_16sdp">19.20dp</dimen>
<dimen name="_17sdp">20.40dp</dimen>
<dimen name="_18sdp">21.60dp</dimen>
<dimen name="_19sdp">22.80dp</dimen>
<dimen name="_20sdp">24.00dp</dimen>
<dimen name="_21sdp">25.20dp</dimen>
<dimen name="_28sdp">33.60dp</dimen>
<dimen name="_30sdp">36.00dp</dimen>
<dimen name="_31sdp">37.20dp</dimen>
<dimen name="_32sdp">38.40dp</dimen>
<dimen name="_33sdp">39.60dp</dimen>
<dimen name="_34sdp">40.80dp</dimen>
<dimen name="_40sdp">48.00dp</dimen>
<dimen name="_41sdp">49.20dp</dimen>
<dimen name="_42sdp">50.40dp</dimen>
for eg: <TextView
android:layout_width="match_parent"
android:layout_height="@dimen/_10sdp"
android:layout_gravity="center"
android:gravity="center"/>
will support all screen sizes.