[英]Android creating themes and styles
我想為我的第一個Android應用程序定義一個主題。 我使用Eclipse,並且遵循本教程,但是有問題。
腳步:
A.我創建帶有內容的values / styles.xml文件
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="default_splashScreen">
<item name="android:background">@drawable/bg</item>
</style>
</resources>
B.我創建帶有內容的values / themes.xml文件
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme" parent="android:Theme">
<item name="SplashScreen">@style/default_splashScreen</item>
</style>
</resources>
現在,Eclipse總是抱怨項目名稱為“ SplashScreen”的節點,並顯示消息“找不到資源...”。 我只希望SplashScreen調用default_splashScreen樣式。
怎么了? 謝謝!
Eclipse是僅在文本編輯器中抱怨還是在實際嘗試編譯和運行應用程序時抱怨? 也許Eclipse無法正確更新項目-請嘗試以下操作之一:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.