Can someone tell me how I can prevent creating an AbstractActivity or BaseActivity in a new project and still be able to do some customizations for all activities inside the app? E.g. setting up a custom toolbar… What’s the best approach for that?
g
gildor
05/26/2020, 10:36 AM
Inject toolbar provider and init it in your activity?
t
tjohnn
05/26/2020, 3:00 PM
You could use extension functions too
o
OG
05/26/2020, 3:20 PM
Use delegates, and favor composition over inheritance
👍 1
n
nino
05/27/2020, 8:03 AM
I now ended up using the ToolbarProvider solution as for this use case this made sense. Thanks.
But well, I prefer the naming ToolbarHandler as you might guess