Results of some experiments to determine which Activity lifecycle methods get called in certain situations.
Launch:
- activity.onCreate()
- activity.onStart()
- activity.onResume()
- activity.onWindowFocusChanged(true)
package your.project.view.helper; | |
import android.databinding.BindingAdapter; | |
import android.graphics.drawable.Drawable; | |
import android.support.annotation.ColorInt; | |
import android.support.annotation.DrawableRes; | |
import android.support.annotation.Nullable; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.text.TextUtils; |
public void start () | |
Starts the currently pending property animations immediately. Calling start() is optional because all animations start automatically at the next opportunity. However, if the animations are needed to start immediately and synchronously (not at the time when the next event is processed by the hierarchy, which is when the animations would begin otherwise), then this method can be used. | |
Source | |
The only difference is that with start it starts immediately. |