kevinhinterlong / archwiki-viewer

A simple Android specific viewer for the Arch Linux Wiki.
https://wiki.archlinux.org/
Apache License 2.0
72 stars 13 forks source link

Dark theme? #33

Open krompus opened 6 years ago

krompus commented 6 years ago

I'd really like to have a toggle for a dark theme; AMOLED would be nice.

kevinhinterlong commented 6 years ago

This would be nice, would you want to try and help out with this?

krompus commented 6 years ago

I'll look into it! I've not looked at the code yet. I'm excited that the app has finally been adopted. :)

kevinhinterlong commented 6 years ago

Sweet! Let me know if you need any help and I can give some info tomorrow about where to start with working on this.

kevinhinterlong commented 6 years ago

Ok so pretty much you're going to want to make a new darkstyle.css file copying the original in app/src/main/assets/style.css and then download any page from the wiki to the same folder as the darkstyle.css.

Once you've downloaded it, you're going to want to edit the page and replace

<head>
<!-- all the stuff in between -->
</head>

with this

<head>
<link rel='stylesheet' href='darkstyle.css' /><meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no' />
</head>

Then open the locally saved page in your browser and start playing around with the hex color values until you find something which looks nice.

Alternatively, you could set up android studio, edit the colors, and then run the app on your phone to view the changes.

Let me know if you get stuck/need anything.

krompus commented 6 years ago

Thanks for the tips; I'll give it a go! We might also make "normal" text size a little bigger; I believe it was set when devices had lower average PPI, and it's a big jump from "normal" to "larger".

I'm good for the CSS, but I've no idea how to add the toggle for theme in the preferences menu.

kevinhinterlong commented 6 years ago

Yea the way we set the text size is actually deprecated, I was planning to add a slider for the text size in #37 so I'll play around with the default there.

I can set up the toggle, but the easiest thing would be to change the file names. It uses whatever is in style.css so you could rename it like this so it only uses the dark theme.

  1. style.css --> anything.css
  2. darkstyle.css --> style.css
seniorm0ment commented 4 years ago

Big +1 for Dark mode, please! I would highly prefer a dark gray instead of amoled, I find it strains my eyes reading on amoled black. So maybe 3 different options (light, dark, amoled/black) would be nice.

seniorm0ment commented 3 years ago

Would be cool to see wiki updated :)

birdietheowl commented 3 years ago

Is there any status update to dark theme, since this issue was added 3.5 years ago?

kevinhinterlong commented 3 years ago

Hey @birdietheowl unfortunately I haven't been keeping up with Android development/archwiki for awhile now. I'd still be open to reviewing it if someone wanted to take over this issue, but I have no plans to complete it

birdietheowl commented 3 years ago

@kevinhinterlong okay, no worries. Was just curious. Completely understand.

killertofus commented 1 year ago

@kevinhinterlong can I take over?

kevinhinterlong commented 1 year ago

@killertofus Yea feel free to take over