There is no need to create separate layout directories
You can refer to this:
For Layouts Consistency refer and use (example is given below): https://github.com/intuit/sdp
Note: Margin , Padding , Height, Width, etc can be used with sdp
for best results.
in your gradle
: implementation 'com.intuit.sdp:sdp-android:1.0.5'
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_200sdp"
android:orientation="vertical"
android:padding="@dimen/_4sdp">
<Button
android:id="@+id/btnAdd"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:layout_marginBottom="@dimen/_12sdp" // SDP used
android:layout_marginEnd="@dimen/_12sdp" // SDP used
android:layout_marginStart="@dimen/_12sdp" // SDP used
android:background="@drawable/shape_button_background"
android:foreground="?android:selectableItemBackground"
android:textColor="@color/white"
android:textSize="18sp" // SP used
android:text="@string/str_confirm_place_order"/>
</LinearLayout>
For Font Size Consistency : I will recommend you to use sp
instead of others.
Note: textSize in Button,EditText,TextView etc can be used with sp
for best results.
<TextView
android:id="@+id/tvFbShare"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="@dimen/_6sdp" // SDP used
android:text="@string/str_share_on_facebook"
android:textColor="@color/fb_blue"
android:textSize="14sp" // SP used />