Language statistics#1262
No reviewers
Labels
No labels
⌚ Major-release
⌚ Minor-release
⚔️ Wontfix
⚙️ CI
⛏️ Breaking
✅ Fixed
✨ Duplicate
❌ Invalid
❓ Question
❤️ Support
➡️ Frontport
➡️ Needs-frontport
🌐 Translation
🌠 Long-term
🎉 Feature
🎯 Enhancement
🏗️ Build
🐛 Bug
👋 Good-first-issue
💀 Deprecation
💡 Suggestion
💬 Discussion
💭 Brainstorming
💰 Sponsored
💻 UI/UX
📄 Documentation
📈 Performance
📌 Priority-critical
📌 Priority-high
📍 Priority-low
📍 Priority-medium
📡 Needs-feedback
📱 F-droid
📸 Release
🔒 Security
🔙 Backport
🔙 Has-backport
🔙 Needs-backport
🔙 Regression
🔭 Cannot-reproduce
🗄️ Repository
🗒️ Changelog
🗓️ Summary
🤾 Google-play
🥑 Ready
🧪 Testing
🧺 Cleanup
🧺 Needs-cleanup
🧾 Confirmed
🩹 External-dependecy
🪒 Refactor
🪜 Upstream
🙇♂️ Needs-help
🚀 Improvement
🚨 Investigate
🛡️ Blocked
🛰️ API-dependency
🟦 Website
No project
No assignees
3 participants Notifications
Due date No due date set.
Dependencies
No dependencies set.
Reference
gitnex/GitNex!1262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lang-stats"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #884
@ -0,0 +7,4 @@*/public class LanguageColor {public static int languageColor(String key) {I woulf prefer a map here over a bunch of ifs.
I can look into this.
@ -76,4 +76,169 @@<color name="gold">#e6b121</color><color name="five_yellow">#fdc92f</color><color name="five_background_grey">#f5f2f0</color>Maybe put these in a separate file?
You mean create something like settings.xml?
Yes, just for the language colors.
@ -0,0 +10,4 @@public static int languageColor(String key) {int color;if (key.equalsIgnoreCase("ASP.NET")) {would it be possible to do code generation based on mentioned json file?
Not I guess, unless we create our own library or use a third party one (if, one is available though).
That's the reason, I used selected options and colors to not just really add everything. And used default color for that reason, if no color matches here, just use default.
But if you know any library which can only do this job, would be great.
@ -78,1 +78,4 @@<color name="five_background_grey">#f5f2f0</color><!-- language statistics colors --><color name="default_lang_color">#49da39</color>as above ... use code generation or seperate in a external lib that is code generated based on the menjoined json
else we will get out of sync soon!!
My reply above.
@ -0,0 +12,4 @@public static int languageColor(String key) {int color = R.color.default_lang_color;Map<String, Integer> colors = new HashMap<>();Can you make this static variable in the class and initialize in a
static { ... }?also move the
putstatements to the initialization (you can just add astatic { ... }block with these inside)Do you mean something like in the Class:
Yes, that's exactly what I mean.