5/30/2023 0 Comments Android studio theme appcompat![]() When I ran the app, this error appears in the logcat:Ĭaused by: : You need to use a Theme.AppCompat theme (or descendant) with this activity.Īt 7.(ActionBarActivityDelegate.java:151)Īt 7.(ActionBarActivityDelegateBase.java:138)Īt 7.(ActionBarActivity.java:123)Īt .onCreate(MainActivity.java:171)Īt (Activity.java:5104)Īt (Instrumentation.java:1080)Īt (ActivityThread.java:2144)Īt (ActivityThread.java:2230)Īt $600(ActivityThread.java:141)Īt $H.handleMessage(ActivityThread.java:1234)Īt android.os.Handler.dispatchMessage(Handler.java:99)Īt android.os.Looper.loop(Looper.java:137)Īt (ActivityThread.java:5041)Īt .invokeNative(Native Method)Īt .invoke(Method.java:511)Īt .ZygoteInit$n(ZygoteInit.java:793)Īt .ZygoteInit.main(ZygoteInit.java:560)Īt . Note: If you are using the Support Library APIs for the action bar, then you must use (or override) the Theme.AppCompat family of styles (rather than the. We can also create our own custom themes in the styles.xml file. Dark indicates that the text colors would be light (generally white). ![]() ![]() android:theme'style/' We are using a default theme for the layout. Drawable / apptheme_edit_text_holo_light style / ButtonAppTheme style / ImageButtonAppTheme drawable / apptheme_btn_default_holo_light drawable / apptheme_btn_default_holo_light Setting the Theme We can set the toolbar theme using the following code.
0 Comments
Leave a Reply. |