Hmm .. The general code does not always have to be in the Activity class, but just in the regular class. What could we call these methods according to our needs, referring to a common code class.
Am I right with this example ?
Of course, if we need this as an Activity, the above sentence will work fine if we take care of the Activity life cycle and we don't forget to add it to the manifest file .
In general, Activities should simply create a user interface, handle events, and delegate business logic and / or other actions to other components of our application.
Greetings
Ewoks
source share