Android Studio 報Integer types not allowed錯誤
Android Studio 報錯
Error:(25, 5) Integer types not allowed (at 'android:textSize' with value '12').
代碼
<style name="HorizontalBtnLayout">
<item name="android:layout_height">match_parent</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:textSize">12</item>
</style>
分析:
1.是不是<style> </style>標(biāo)簽內(nèi)不能使用android:textSize,系統(tǒng)有提示,說明可以的
2.根據(jù)報錯Integer tyes is not allowed,考慮到是不是類型有問題,😝,改為12sp已ok
3,記得一定帶單位
<item name="android:textSize">12sp</item>
相關(guān)文章
Android用戶界面開發(fā)之:TextView的使用實例
Android用戶界面開發(fā)之:TextView的使用實例,需要的朋友可以參考一下2013-05-05
Android Material Design 陰影實現(xiàn)示例
這篇文章主要介紹了Android Material Design 陰影實現(xiàn)示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-04-04
Android編程判斷SD卡是否存在及使用容量查詢實現(xiàn)方法
這篇文章主要介紹了Android編程判斷SD卡是否存在及使用容量查詢實現(xiàn)方法,實例分析了Android針對SD卡是否存在及使用容量、全部容量等的判斷技巧,非常簡單實用,需要的朋友可以參考下2015-10-10
Android關(guān)于SeekBar無法點擊到最大值問題解決方法記錄(推薦)
這篇文章主要介紹了Android關(guān)于SeekBar無法點擊到最大值問題解決方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-04-04
Android View源碼解讀 DecorView與ViewRootImpl淺談
這篇文章主要解讀了Android View源碼,為大家詳細(xì)介紹DecorView與ViewRootImpl,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-02-02

