android - Which one is better option for maintaining application or activities? -


which 1 better option application or activities?

a. baseactivity class, [or]

b.singleton class.

in application of activities same actions show toasts, maintaining sessions, static variables,show edittext errors, http request/response, etc., i'm extends baseactivity in activities needed.

you're on right path, baseclass preferred because of thing mentioned (manipulating toasts, edittext functions) require context work with. singleton class need context passed every method call - baseclass not (since technically context itself).


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -