What is the difference between ?android:attr/textAppearanceMedium and ?android:textAppearanceMedium?
According to Android Developer API Guide - Accessing Resources - Referencing style attributes, the resource type is optional if the system resource tool can figure out the correct resource type. So they are referring to the same value.
I think they both do the same, that is refer to a theme attribute.
The DOCS say...
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
The [type:]
being optional.
More explanation in the following links...
need explanation for android layout syntax
References to Theme Attributes