hi do you know if there is a shortcut way to setup your layout files, a bit like CSS. e.g. rather than
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="10dp"
android:layout_marginRight="5dp"
maybe like this?
android:layout_margin="20dp, 20dp, 10dp, 5dp"
the same would be for Padding/Radius etc...
if you want to set same value for all side then you can use like this:
android:layout_margin="20dp"
if you have different value for all side then you have to set them in this way:
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="10dp"
android:layout_marginRight="5dp"
and the same thing for padding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With