Using different dimens files you can do this thing.
values-mdpi ->dimens.xml
values-hdpi ->dimens.xml
values-xhdpi ->dimens.xml
values-xxhdpi ->dimens.xml
For example:
define one in values-mdpi ->dimens.xml
<dimen name="scale_1dp">10dp</dimen>
and for values-hdpi ->dimens.xml
<dimen name="scale_1dp">12dp</dimen>
and for values-xhdpi ->dimens.xml
<dimen name="scale_1dp">15dp</dimen>
And after that use this dimen
<ImageView
android:layout_width="@dimen/scale_1dp"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
same thing for text size.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…