Note: Since the Architecture Components are in alpha stage,
AppCompatActivityclasses cannot implement it (because we cannot add a dependency from a stable component to an unstable API). Until
LifecycleFragmentclasses are provided for convenience. After the Lifecycles project is released, support library fragments and activities will implement the
LifecycleFragmentwill be deprecated at that time. Also, see Implementing LifecycleOwner in custom activities and fragments.