2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidのActionBarのThemeをカスタマイズする時にはまったこと

Last updated at Posted at 2014-11-28

ここでthemeを作るじゃないですか

Style name"otdp" みたいなアルファベットの小文字にしたとします

tiapp.xml を変更しますよね

tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>19</tool-api-level>
    <manifest>
        <application android:theme="@style/Theme.otdp"/>
    </manifest>
</android>

でもこれじゃだめなんですよ

Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.otdp')

ってなっちゃうんですね

でダウンロードしてきたresファイルの中をチラ見してみたら

res/values/styles_otdp.xml
<style name="Theme.Otdp" parent="@style/Theme.AppCompat.Light">

。。。

頭文字大文字になるんかい

ということで

tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>19</tool-api-level>
    <manifest>
        <application android:theme="@style/Theme.Otdp"/>
    </manifest>
</android>

にしたらビルドできました

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?