Aru*_*ava 3 android android-layout android-studio floating-action-button
我试图在styles.xml中包含app:fabSize,但是android studio抛出错误
有没有办法在styles.xml中包含app:fabSize和其他app:属性?
在layout.xml中添加Compat属性时,应使用先前定义的名称空间(实际上并不一定要使用它app
,但应通过xml在xml中定义xmlns:
-例如,hello
也可以使用名称空间。无论如何,这app
是一种标准) 。
<android.support.design.widget.FloatingActionButton
xmlns:hello="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
hello:fabSize="mini"/>
Run Code Online (Sandbox Code Playgroud)
但是在styles.xml中使用Compat属性时,不应放置任何东西,而应放置属性名称:
<style name="StyleName">
<item name="fabSize">mini</item>
</style>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
615 次 |
最近记录: |