我想通過應用程序添加動態字體更改設置。我使用了典型的樣式和attr方法,但是我收到了這個警告。Android Studio - 渲染問題,屬性文本大小無效
渲染問題屬性「textSize」中的「?attr/font_medium」不是有效的格式。 (未示出16個類似的錯誤)
實施例的TextView
<TextView
android:id="@+id/labelWeeks"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="2dp"
android:paddingRight="2dp"
style="@style/TextViewStyle"
android:textColor="@color/app_white"/>
我style.xml具有此
<style name="TextViewStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:text">@string/app_name</item>
<item name="android:ellipsize">end</item>
<item name="android:textSize">?attr/font_small</item>
</style>
和attr.xml具有此
<declare-styleable name="FontStyle">
<attr name="font_small" format="dimension" />
<attr name="font_medium" format="dimension" />
<attr name="font_large" format="dimension" />
</declare-styleable>
所以,這是什麼警告是關於和如何reslove它