So here’s what I’m trying to do.
<RelativeLayout
android:id="@+id/label_block"
android:layout_width="308dp"
android:layout_height="154dp"
android:layout_margin="?attr/primaryMargin" <!----- THIS HERE
I’d like to be able to reference my own attributes just like how you can reference android theme attributes like android:textAppearance=”?android:attr/textAppearanceLarge”
The goal is to have a centralized place for all my paddings and other common values to reference them in xml layouts.
Is there anyway I can do this? I can’t figure it out.
well you can define your Dimensions like this way:
in path /res/values/dimensions.xml
and you will reference it like this way: