Search code examples
androidmethodslifecycleactivity-lifecycle

Should lifecycle methods in android studio must have a specific sequence?


Should I have to put lifecycle methods, (like onRestart,onResume) in a specific sequence in an android studio project or it doesn't really matter?


Solution

  • The order of methods in source code doesn't affect their functionality.

    Just put them in a such order that is clear for you and your team. For example in the order of their calls while activity run.