Comments (22)
As for the change to switch to if, I dont think what the issue is. If it is the default in latest gradle/java I guess it means it is optimized in some way. Otherwise the default would have remain to allow the switch.
It optimizes something that this application doesn't need optimized while forcing unnecessary code changes. This is a misguided default change - which is par for the course for Android.
Anyway, this conversation started with you saying "switch migration to if is needed ..." and I'm just pointing out that's not the case, that's all.
from aard2-android.
@soshial here you go the app is now using kotlin and using material components:
I think i am past the post of simple PRs as @itkach mentioned. Guess it is time for a new app!
@itkach thanks again for your feedback. If at any point you want us to "merge" and start working together on that "new" code base, please let me know. This is the route i would prefer
from aard2-android.
@soshial i have no idea :D Materiaard ? :P
I am also working on making the article loading much faster. Until now it was quite slow because multiple articles were loaded at the same time
from aard2-android.
If your changes become huge, those won't be merged into the official repo.
Please split them into branches, make pull requests and only then it's possible to review and merge.
Also, depends on whether @itkach has any will to continue this project.
from aard2-android.
@soshial yes i know. But the migration has to be a big one. Androidx/material are really linked.
And yes it depends on @itkach wanting to continue. @itkach if you need help maintaining this i am really interested in helping.
from aard2-android.
BTW, there have been several huge forks with full rework of this app (but I suppose those are stale now) — you may find cool things to rebase on or improve on.
from aard2-android.
@soshial Nice did not know. Will take a look
from aard2-android.
@farfromrefug thank you, I appreciate the effort. So far it looks mergeable. Even though it is technically quite big in terms of number of changes, most of these changes appear to be rather mechanical/cosmetic, nothing changes conceptually. I do see, however, some changes unrelated to androidx migration already crept in: for example replacing switch statements with ifs here and here and in other places, or an attempt at issue fix, or merging a pull request, or tooling updates. While such changes are not necessarily blockers (and some may even be unavoidable, like tooling updates aggressively forced by Google), they do make it more difficult to review and test, and may make it impossible to merge if enough of them are accumulated in one PR.
BTW, there have been several huge forks with full rework of this app (but I suppose those are stale now) — you may find cool things to rebase on or improve on.
If that's what you would like to do (full rework) then I think the best course of action would be to keep that as a separate project and release it under a new name. I'd be happy to recommend users check out such a new application when it is ready.
depends on whether @itkach has any will to continue this project.
I achieved my personal goals I had with this project a long time ago. I do keep using it myself (lightly) and I would like to keep it in working order for the foreseeable future if I can, but I do not plan or want any new major development. Small fixes and tweaks, occasionally catching up with Android tooling, refreshing the look/theme - sure. Re-architecting the app, re-thinking navigation patterns and UI in general, re-organizing the code, re-writing in Kotlin (as someone suggested once) - all these may be great ideas potentially resulting in great new app(s) but I think they are best pursued as their own separate projects.
from aard2-android.
@itkach switch migration to if is needed because it is not supported anymore in latest java.
For the other changes indeed ( you did looked at it all ;)) i will move them to a separate PR. I am working on multiple things at the time. Dont worry i will separate all that!
As for the future and big updates like architecture, navigation,..., i am willing (if it is something i need as my personal need for this app) to implement them. If you agree you could add me as to this repo and i could implement such things with PRs so that you can still have a look at it
from aard2-android.
@itkach switch migration to if is needed because it is not supported anymore in latest java.
Hm... that would be a pretty incredible breaking change in Java, and indeed I can't find any documentation that would support your statement. Can you elaborate?
from aard2-android.
You can read more about problems with switch statements here.
Basically it won't compile if the integer is not final:
![Screenshot 2024-06-28 at 18 44 41](https://private-user-images.githubusercontent.com/100644/344249942-7e359378-319d-4dba-9ba8-10381f4e7be8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM1NjgzMzIsIm5iZiI6MTcyMzU2ODAzMiwicGF0aCI6Ii8xMDA2NDQvMzQ0MjQ5OTQyLTdlMzU5Mzc4LTMxOWQtNGRiYS05YmE4LTEwMzgxZjRlN2JlOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxM1QxNjUzNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMGUwODEwYmQ2MjM2ODAwYzU1ODQyMGQyMTFmMDk5OWNmMTMzNGMyOTU1NDYzYTFiMDcxZjdhMGQxNTJiZDcyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ZqTpExNDQ0fZ9VPNgdWnBhKex6TqxXmiQTfUWfTEHGw)
from aard2-android.
Ah, so switch is supported in latest Java just fine - phew, got me worried there for a moment! 😌 - this is android tooling issue, thank you for clarifying. Looks like, more specifically, it's a breaking change in Android Gradle Plugin 8.0.0 defaults. Since this defaults change doesn't benefit this app in any meaningful way, an easy way to avoid changing the switch statements would be to explicitly set android.nonFinalResIds
to false or even better - gasp! - to not make gradle plugin upgrade part of these changes.
from aard2-android.
android.nonFinalResIds=false
will probably help against this change. Also, I think we need to upgrade the gradle plugin, because it's needed to use the latest Android Studio. But I am not 100% sure about this. @farfromrefug
from aard2-android.
android.nonFinalResIds=true
You mean android.nonFinalResIds=false
. true
is the new default, false
is the previous default.
I am not sure ... will help against this.
Why not?
from aard2-android.
Updated my answer
from aard2-android.
@itkach i think upgrading to gradle 8 is kind of a must have. Anyway at one point you will be force too to be compatible with latest targets and thus release with new features.
As for the change to switch to if, I dont think what the issue is. If it is the default in latest gradle/java I guess it means it is optimized in some way. Otherwise the default would have remain to allow the switch.
But anyway it is your choice, just dont see the issue in migrating to if
from aard2-android.
@itkach yes sure dont worry I ll create à PR for what you accept and the rest will remain in my fork. Might just come a point where I cant PR anymore as it does not align with my goals.
At that point I might create a new app.
Thanks a lot for everything you Ve done.
I am still "comparing" your slob format and zim.
Your slob are much smaller which interest me. Plus I cant get remote content load to work in zim/kiwix
from aard2-android.
BTW, @farfromrefug, if you maintain this app (or its fork), I'll come in and help from time to time with some features/bugfixes/improvements, because I use this app really often.
from aard2-android.
@soshial thanks a lot. Yes i think i might have to go for a work. I am already making more changes for better usability and i have more ideas.
from aard2-android.
BTW, since you're migrating to Material Theme, @farfromrefug, it would be cool to migrate the tabs as well:
- to show their names under the icon
- put them in them bottom for better UX
from aard2-android.
@soshial Yes i plan on going full material. Just gonna take some time as this mean true rewrite not just theme / style migration
from aard2-android.
Wow, this looks pretty much amazing, @farfromrefug! 🔥
Thanks for removing that weird font file and making the app completely in Kotlin.
So what are your plans for the app? How are you going to name it?
from aard2-android.
Related Issues (20)
- Dark theme for articles is missing in Aard2 0.54 HOT 2
- Aard2 0.54 fails to start on AOSP 4.4.4 … HOT 4
- Non-empty search field should have focus HOT 4
- Aard2 fails to view articles in Gesner Latin dictionary HOT 3
- Unable to load content in Android 12 HOT 2
- Search is case insensitive HOT 17
- [Feature Request] Allow regex in search HOT 1
- Morphology
- (Android 14) App Crash after Start HOT 3
- Crashes on start if not given network permissions HOT 4
- Aard 2 0.55 HOT 2
- Startup crash when Android 14 regional preferences are set to non-default values HOT 7
- Crashes on Android14 (crdroid 10) HOT 1
- The app crashes when filtering HOT 2
- The layout is inconsistent using the "Zoom Out" setting HOT 2
- When a word is bookmarked, duplicates appear marked but are not actually bookmarked
- Why the app uses internet permission HOT 1
- BUG: dictionaries cannot be deleted HOT 3
- [Feature request] Organize dictionaries in groups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aard2-android.