Where to set all Listeners
for the user interfaces?
Is it good practice to set them in onCreate
? This looks so unstructured and strange.
Is
For listeners onCreate() is good place.
Consider 2 activities A,B.
A -> B, launching 'B' Activity from 'A', if we come back from B -> A then onStart(), onResume() methods will be called again in 'A' activity and that is redundant. So it's better practice to only add listeners in onCreate() only.
And, for button listeners you can set attribute android:onClick="method_name" in xml file only.