Android Navigation barでaction_barの背景色を変える方法に困っています
デフォルトはこれで、
lang
1<resources> 2 3 <!-- Base application theme. --> 4 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 5 <!-- Customize your theme here. --> 6 </style> 7 8</resources>
ググってこう変えてみたのですが、
lang
1<resources> 2 <style name="AppTheme" parent="@android:style/Theme.Holo.Light"> 3 <item name="android:actionBarStyle">@style/MyActionBarTheme</item> 4 </style> 5 6 <style name="MyActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar"> 7 <item name="android:background">@color/main_blue</item> 8 </style> 9</resources>
MainAvtivityで以下のようにエラーがでて、落ちます。
lang
1java.lang.RuntimeException: Unable to start activity ComponentInfo{com.miyachi.space/com.miyachi.space.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
どなたか解決方法をご存知の方いますでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。