-
Notifications
You must be signed in to change notification settings - Fork 84
DevelopmentFAQ
Is there a way to view the content of the database ?
How to add a new color theme ?
Q: : Is there a way to view the content of the database ?
A : You have to enable ObjectBox browser in your build. To do that, you need to set the INCLUDE_OBJECTBOX_BROWSER
local environment variable to true
on your computer before building Hentoid.
The ObjectBox browser shows a notification on your phone at app startup. Tapping on it, you can browse the database using your browser. More information here : ObjectBox Data Browser
On Windows : use Settings > Environment variables
and set them up to look like the screenshot below. You should restart Android Studio after that for it to take the new variable into consideration.
Q: : How to add a new color theme ?
A : To add a new color theme, follow the steps below :
- Copy
res/values/theme-light.xml
into a new file (e.g.res/values/theme-newname.xml
) - Copy
res/values/colors-light.xml
into a nw file (e.g.res/values/colors-newname.xml
) - Open
me.devsaki.hentoid.enums.Theme.java
and add your theme in the enums (e.g.NEWNAME(3, "Newname")
). The numeric code should be a new number that no other theme is using. - Open
res/values/array_preferences.xml
, look for thepref_color_theme_entries
andpref_color_theme_values
entries and add the name and code of your theme - Open
res/layout/intro_slide_05.xml
and duplicate the lastTextView
. Rename the new block with the properties of your theme - Open
me.devsaki.hentoid.fragments.intro.ThemeIntroFragment
and create a new click listener for your theme (also editme.devsaki.hentoid.util.Preferences.Constant
to add a newstatic final
attribute to use there)
Be sure to keep the same word to describe your theme (in our example : "newname") across all steps. Failing to do so will result in bugs.
- You may now tweak the colors defined in the files created at steps 1 and 2. Have fun !
Brought to you by the Hentoid Team with ❤️
Latest Release | Discord