编辑支持栏主题

时间:2017-07-01 21:09:17

标签: android

我做了一个应用程序,但是当我调试时,支持框是白色的,包括字母和背景。

我无法发送图片,请注意,我没有10个声望,而是谷歌加链接!

Error

谢谢!

P.S。代码无关紧要,这里是错误日志

07/09 00:14:08: Launching app
$ adb push C:\Users\Lord Tywin Lannister\AndroidStudioProjects\miniconapp\app\build\outputs\apk\app-debug.apk /data/local/tmp/gemine.miniconapp
$ adb shell pm install -r "/data/local/tmp/gemine.miniconapp"
	pkg: /data/local/tmp/gemine.miniconapp
Success


$ adb shell am start -n "gemine.miniconapp/gemine.miniconapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 2425 on device emulator-5554
W/System: ClassLoader referenced unknown path: /data/app/gemine.miniconapp-1/lib/x86
I/InstantRun: Instant Run Runtime started. Android package is gemine.miniconapp, real application class is null.
W/System: ClassLoader referenced unknown path: /data/app/gemine.miniconapp-1/lib/x86
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
I/OpenGLRenderer: Initialized EGL, version 1.4
I/Choreographer: Skipped 37 frames!  The application may be doing too much work on its main thread.
D/gralloc_ranchu: Emulator without host-side GPU emulation detected.
I/Choreographer: Skipped 86 frames!  The application may be doing too much work on its main thread.
I/Choreographer: Skipped 36 frames!  The application may be doing too much work on its main thread.
I/ListPopupWindow: Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.
W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
I/Choreographer: Skipped 38 frames!  The application may be doing too much work on its main thread.
E/ActivityThread: Performing stop of activity that is not resumed: {gemine.miniconapp/gemine.miniconapp.MainActivity}
                  java.lang.RuntimeException: Performing stop of activity that is not resumed: {gemine.miniconapp/gemine.miniconapp.MainActivity}
                      at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3465)
                      at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3550)
                      at android.app.ActivityThread.-wrap20(ActivityThread.java)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:148)
                      at android.app.ActivityThread.main(ActivityThread.java:5417)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa0714270
I/Choreographer: Skipped 112 frames!  The application may be doing too much work on its main thread.
E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9eac78b0
I/Choreographer: Skipped 38 frames!  The application may be doing too much work on its main thread.
E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9d8f9c10
E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9d92bfe0
D/OpenGLRenderer: endAllStagingAnimators on 0x9ec5a100 (MenuPopupWindow$MenuDropDownListView) with handle 0xa197d270
I/Choreographer: Skipped 104 frames!  The application may be doing too much work on its main thread.
E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9d92c0d0

1 个答案:

答案 0 :(得分:0)

您可以使用样式XML文件更改整体主题。幸运的是,预定义的主题可以为您提供所需的效果。只需导航到res/layout/styles.xml,您就会发现类似的内容:

<!-- Base application theme. -->
<style name="AppTheme" parent="...">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

将父级修改为"Theme.AppCompat.Light.DarkActionBar"