File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,9 +80,29 @@ protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState)
8080 // Init
8181 //////////////////////////////////////////////////////////////////////////*/
8282
83+ /**
84+ * This method is called in {@link #onViewCreated(View, Bundle)} to initialize the views.
85+ *
86+ * <p>
87+ * {@link #initListeners()} is called after this method to initialize the corresponding
88+ * listeners.
89+ * </p>
90+ * @param rootView The inflated view for this fragment
91+ * (provided by {@link #onViewCreated(View, Bundle)})
92+ * @param savedInstanceState The saved state of this fragment
93+ * (provided by {@link #onViewCreated(View, Bundle)})
94+ */
8395 protected void initViews (final View rootView , final Bundle savedInstanceState ) {
8496 }
8597
98+ /**
99+ * Initialize the listeners for this fragment.
100+ *
101+ * <p>
102+ * This method is called after {@link #initViews(View, Bundle)}
103+ * in {@link #onViewCreated(View, Bundle)}.
104+ * </p>
105+ */
86106 protected void initListeners () {
87107 }
88108
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ public void onDestroyView() {
8080 if (errorPanelHelper != null ) {
8181 errorPanelHelper .dispose ();
8282 }
83+ emptyStateView = null ;
84+ emptyStateMessageView = null ;
8385 }
8486
8587 protected void onRetryButtonClicked () {
Original file line number Diff line number Diff line change @@ -139,6 +139,12 @@ public void onDestroy() {
139139 }
140140 }
141141
142+ @ Override
143+ public void onDestroyView () {
144+ super .onDestroyView ();
145+ binding = null ;
146+ }
147+
142148 /*//////////////////////////////////////////////////////////////////////////
143149 // Menu
144150 //////////////////////////////////////////////////////////////////////////*/
Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
115115 feedGroupsCarouselState = feedGroupsCarousel.onSaveInstanceState()
116116 }
117117
118+ override fun onDestroyView () {
119+ super .onDestroyView()
120+ _binding = null
121+ }
122+
118123 override fun onDestroy () {
119124 super .onDestroy()
120125 disposables.dispose()
You can’t perform that action at this time.
0 commit comments