View elements use the following types of values for their attributes:
true or false,
see Android documentation.@android:boolean/name.@boolean/name.?android:attr/name or ?android:name.?attr/name or ?name.@android:color/name,
see Android documentation@color/name.?android:attr/name or ?android:name,
see Android documentation.?attr/name or ?name.A decimal number followed by a unit of measure:
dp — Density-Independent pixels, an abstract unit that is based on the physical density of the screen.sp — Scale-Independent Pixels, like the dp unit but also scaled by the user's font size preference.pt — Points, 1/72 of an inch based on the physical size of the screen, assuming a 72 DPI density.px — Pixels, corresponds to actual pixels on the screen.mm — Millimeters, based on the physical size of the screen.in — Inches, based on the physical size of the screen.@android:dimen/name,
see Android documentation.@dimen/name.?android:attr/name or ?android:name,
see Android documentation.?attr/name or ?name.An URI of an image store on the device:
android.resource: an resource packaged in app, declared as
android.resource://package-name/resource-id.content: accessible image content provided by app, e.g:
content://com.llamalab.automate.provider/icons/id
where id is an integer between 61441 and 61769 (see Icon pick block),
optionally append ?size=dimension to specify a size.content://com.llamalab.automate.provider/text-icon/text
where text is your text,
optionally append ?size=dimension to specify a size."a", "d", or as a last-resort (Privacy warning!) "s" for widget layouts.data: in-line image data, e.g. data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIxLjJjLTUuMDczIDAtOS4yLTQuMTI3LTkuMi05LjJhMS4zOCAxLjM4IDAgMSAxIDIuNzYgMGMwIDMuNTUgMi44ODkgNi40NCA2LjQ0IDYuNDQgMy41NSAwIDYuNDQtMi44OSA2LjQ0LTYuNDRhMS4zOCAxLjM4IDAgMCAxIDIuNzYgMGMwIDUuMDczLTQuMTI3IDkuMi05LjIgOS4yTTkuNyA2LjAyQTEuMzggMS4zOCAwIDAgMSA4LjMyIDcuNEg0LjE4QTEuMzggMS4zOCAwIDAgMSAyLjggNi4wMmEzLjQ1IDMuNDUgMCAwIDEgNi45IDBtMTEuNSAwYTEuMzggMS4zOCAwIDAgMS0xLjM4IDEuMzhoLTQuMTRhMS4zOCAxLjM4IDAgMCAxLTEuMzgtMS4zOCAzLjQ1IDMuNDUgMCAwIDEgNi45IDAiLz48L3N2Zz4file: an external storage file, usually don’t work in a widget layout.Note!Using an URI in an adapter item view layouts may cause sizing issues on Android 11 and lower.
@android:drawable/name,
see Android documentation.@drawable/name.?android:attr/name or ?android:name,
see Android documentation.?attr/name or ?name.See supported image formats, Scalable Vector Graphics (SVG) version 1.1 is also supported.
Must be one of the listed values.
Must be one or more of the listed values separated by |.
?android:attr/name.?attr/name.@+id/name,
see Android documentation@android:id/name,
see Android documentation.@id/name.@android:integer/name,
see Android documentation.@integer/name.?android:attr/name.?attr/name or ?name.@android:string/name,
see Android documentation@string/name?android:attr/name?attr/name or ?name