-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: start working on dark theme #138
base: master
Are you sure you want to change the base?
Conversation
- move theming to values - inherit from appcompat DayNight to support system dark mode
So let's see the bad news; when changing this I get some strange error about not finding the Here's the log for this error, unfortunately I don't have that much experience so I'm not sure how to proceed
|
Installing on a virtual device got me further and now the error is caused by setting the action bar so definitely my bad. If you know how to fix this further please let me know E/AndroidRuntime: FATAL EXCEPTION: main
Process: de.j4velin.pedometer, PID: 3647
java.lang.RuntimeException: Unable to resume activity {de.j4velin.pedometer/de.j4velin.pedometer.ui.Activity_Main}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3581)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
at de.j4velin.pedometer.ui.Fragment_Overview.onResume(Fragment_Overview.java:116)
at android.app.Fragment.performResume(Fragment.java:2554)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1322)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1557)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1618)
at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3027)
at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2989)
at android.app.FragmentController.dispatchResume(FragmentController.java:200)
at android.app.Activity.performResume(Activity.java:7138)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) |
I've been toying around #86 and would like to add support a dark theme based on the
system DayNight theme.
It's not extremely clear to me what should be done but this is the gist of it
at the moment the
appTheme
is not even populated but there you can put the values for the style of views and then apply the style on the single elements.