but I've tried a couple of things that just don't seem to work
I would not expect either of those two to work. A View
is not a manifest file. A layout is not a manifest file.
It seems rather useless if there isn't a way to get to the version from either code or XML.
It is simply not used for processing views. Few things in android.R.attr
pertain to views. At most, this value might be used when Android internally parses the manifest. My guess is that it is in android.R.attr
as a side-effect of some other metadata declaration, as a quick casual search of the Android source code did not turn up a match.