Please never use androidannotations in a modern Android project. The codegen it does behind the scenes makes your compile times so much longer. It's been less than a month since it finally supported incremental compilation support. In addition, it's a lot of non configurable magic that will bite you if you ever need to do something a bit funky with different resources.
If you use kotlin, you can make use of synthethics which will automatically provide you with variables that bypass the need of calling `findViewById<T>`, including proper type inference. A slight step further, ViewBindings actually also give you type safety and null safety, depending on your layout. Then it simply becomes a matter of `binding.buttonThatIsNotHereOnLayout2?.setOnClickListener(this::onButtonClickedDoThing)`. Even if using Java, you can use the shorthand lambdas to do button.setOnClickListener((v) -> this.onButtonClicked()).
Much of the rest that is shown are matters of dependency injection, or are fixed with newer updates to the Android SDK. Fragments can have their layouts specified directly in their constructor, AsyncTasks have been deprecated over and over again, etc. AndroidAnnotations was alright in 2015-2016, where the Android API was truly dreadful. It still is, but most of the truly awful things are gone.
Thanks - sounds like the world of Android development has evolved a lot since I last looked at it. There's a lot of talk around Kotlin, so I guess it's time to look at that transition and what happened there.
It sounds promising if most of the bad and horrifying things are gone since the days of 2015/2016 when these tools helped!
Don't get me wrong, there's still plenty of crap. Google dug themselves in a deep hole with their god activities and insane fragment lifecycle. But if anything... The fragment lifecycle is about the worst there is now. The AndroidX libraries have done it a lot of good.
If you use kotlin, you can make use of synthethics which will automatically provide you with variables that bypass the need of calling `findViewById<T>`, including proper type inference. A slight step further, ViewBindings actually also give you type safety and null safety, depending on your layout. Then it simply becomes a matter of `binding.buttonThatIsNotHereOnLayout2?.setOnClickListener(this::onButtonClickedDoThing)`. Even if using Java, you can use the shorthand lambdas to do button.setOnClickListener((v) -> this.onButtonClicked()).
Much of the rest that is shown are matters of dependency injection, or are fixed with newer updates to the Android SDK. Fragments can have their layouts specified directly in their constructor, AsyncTasks have been deprecated over and over again, etc. AndroidAnnotations was alright in 2015-2016, where the Android API was truly dreadful. It still is, but most of the truly awful things are gone.