-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix issue #7633 #7664
Fix issue #7633 #7664
Conversation
@czlucius could you post a screenshot please? ❤️ Looking at the code shouldn't it be enough to have a custom |
Yes. I did not look into this option. I shall modify the code. |
By the way, |
That one is used to theme the dialogs other than the ones launched via the settings screen (where we have full control on programmatically theming the dialog on-the-fly based on server-side colors. Since that doesn't work nicely for settings when introduced so calls "FallbackThemes" so you might create a grey-ish fallback dialog theme. |
75f754e
to
a95c363
Compare
@czlucius any reason for closing the PR? 😢 |
Sorry, I had resetted my previous commit, so I had to force push my local repo to GitHub. |
I think GitHub automatically closed it when I had reset my previous commit |
Ok. But why does the button colors not change when I modify |
I think you need to add the dialog theme to the FallBackTheme |
I updated the fallback theme( Right now, I have found 2 solutions:
|
Wouldn't the later change all other dialogs within the app too? Without having had a look and giving it a try (I am away from my laptop) I'd say the first solution would be save(er) 👍 |
Forgot to mention: thanks for all your effort and patience discussing the solution. This is highly appreciated ❤️ |
You may want to see the |
Thanks |
Perhaps that is why |
Yeah, that might be the root cause, could you check if it "works" if you switch it to the fallback theme? |
Which solution would be the best? |
I have tried switching the theme, but the button stays invisible. |
I think the custom ListPreference is still the best option. |
@czlucius then let's go with your solution 👍 |
Sorry. I made a mistake in the styles.xml and used |
Add `android:buttonBarButtonStyle` to `FallbackTheming.Dialog`, modifying the button style of the fallback `AlertDialog`, so that the button would not appear as invisible.
dc06c17
to
36c6729
Compare
This commit changes the button text color from black(#000000) to a prominent text color that varies depending on the theme settings.
I have pushed the updates to this PR, you may take a look at the commits made. |
This commit changes the text color of the AlertDialog's buttons from `?android:attr/textColorPrimary` to `@color/text_color`. This ensures that the button text can be readable throughout all themes.
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/128-IT-master-15-00 |
stable-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/128-IT-stable-15-03 |
CodacyLint
SpotBugs (new)
SpotBugs (master)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@czlucius with your latest commit it works like a charm 👍 @color/text_color
is doing it's job 🎉
Thanks |
By the way, while testing, I keep on receiving crashes with this exception while opening the app
I had to turn off the Wi-Fi so that this error will not happen Steps to reproduce:
Device info: |
Fix issue nextcloud#7633 Signed-off-by: thelittlefireman <thelittlefireman@users.noreply.github.com>
Fix for issue: #7633
Add ThemedListPreference, extending ListPreference, to theme dialog created by ListPreference.
Add style for dialog, setting default button text color in fallback dialog theme to ?android:attr/textColorPrimary
Testing
Writing tests is very important. Please try to write some tests for your PR.
If you need help, please do not hesitate to ask in this PR for help.
unit tests
instrumented tests
UI tests
How to do a test? I am new to contributing to open source, and I noticed that this issue is labelled with "good-first-issue". Apologies if this PR is not well written/there are problems with this commit.