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
Use material theme on Android 5.0+ #137
Conversation
…alues-v21/service_styles.xml
What's the idea to fix this / reintroduce this? |
For the app icon in the toolbar, the Toolbar docs recommend leaving it off:
(from http://developer.android.com/reference/android/widget/Toolbar.html ) Also - if we merge my other PR that adds the "Up" button to the viewer activity, the Up button (with the Material theme) takes up the space that was previously used by the app icon. For the progress spinner, it sounds like the API's that were being used are no-op with the Material theme. I found some info here: http://stackoverflow.com/questions/27788195/setprogressbarindeterminatevisibilitytrue-not-working |
This restores the progress spinner in the action bar on Android 5.0+ with the material theme. See also: http://stackoverflow.com/questions/27788195/setprogressbarindeterminatevisibilitytrue-not-working
Great, I also think the current UI can be modified to use Material design. Futhermore, you can also try to implement the immersive mode (mentioned in #131), which makes system status bar transcluent, this mode should also be activated in fullscreen mode for 5 seconds through scroll, zoom, and just touch the page. |
The progress spinner implementation is working well for me. If we are OK with dropping the app icon from the toolbar, which is the norm for material design, I guess this is ready for review. (sorry don't mean to pester :) I've also done some more research on the appcompat support library. The appcompat library also gives you the material theme on android versions down to API7, and ActionBar/Toolbar on those devices as well. Not sure if we'd want to use that or not. |
@ericwa Code looks good to me. Would accept 👍 @tuxor1337 are you okay with this? |
Yes, I'm okay with this. By the way, how about giving @ericwa push permissions? He's been doing a really great job here lately. :) |
Use material theme on Android 5.0+
@ericwa I added you to the dev group, you should now have write access. |
Awesome, thanks :) |
Small change to use the Material theme on Android 5.0+.
I didn't bother copying using ebookdroid.ActionBarStyle in the new theme, because all that seemed to be doing was setting the foreground and background colors to @color/actionbar_white and @color/actionbar_black
We could customize the status bar / action bar colours, see: http://developer.android.com/training/material/theme.html , but I'm not sure what they should be so I just left it alone. This gives a black status bar and dark grey action bar.
With the material theme, the progress spinner when a page is loading is gone now, and the Action Bar icon is gone as well.
Here are some screenshots: