Which is equivalent
finish()
for fragment activity in
OnPause();
I canβt find it anywhere, I just want the fragment to end when it is paused
As others have already pointed out, call finish (), as in normal activities. Regarding the onPause () part of your question, I'm not sure what you are looking for, but it might be a good idea to consider the life cycles of actions and fragments ...
Activity Life Cycle
http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
Fragment Life Cycle
http://developer.android.com/reference/android/app/Fragment.html#Lifecycle
call this line and it will kill the current fragment
getActivity().finish();
You can use the finish () function. FragmentActivity expands activity
http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html
A FragmentActivity expands from Activity , so you can use the finish() call to complete your class.
FragmentActivity
Activity
Source: https://habr.com/ru/post/947604/More articles:Using Intellij to set breakpoints in a gradle project - javaIntelliJ IDEA debugger executes child process - java405 (METHOD NOT ALLOWED) for ajax request with django - jqueryeclipse: debugging a software initiated process - javaDebugging a JVM application (Java or Scala) with breakpoints in Gradle and IntelliJ 2016.3.5 - debuggingThe subtle difference between sorting and sort_by - sortingHow to uniformly initialize a unique_ptr map? - c ++R, ggplot2, plot size - rreactive variable to capture user input (Meteor) - javascriptAny GC.disable performance flaws? - optimizationAll Articles