本文整理了Java中androidx.fragment.app.Fragment.onDestroyView()
方法的一些代码示例,展示了Fragment.onDestroyView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.onDestroyView()
方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称:Fragment
方法名:onDestroyView
暂无
代码示例来源:origin: trello/RxLifecycle
@Override
public void onDestroyView() {
lifecycleSubject.onNext(FragmentEvent.DESTROY_VIEW);
super.onDestroyView();
}
代码示例来源:origin: mikepenz/AboutLibraries
@Override
public void onDestroyView() {
libsFragmentCompat.onDestroyView();
super.onDestroyView();
}
}
代码示例来源:origin: trello/RxLifecycle
private void testLifecycle(LifecycleProvider<FragmentEvent> provider) {
Fragment fragment = (Fragment) provider;
startFragment(fragment);
TestObserver<FragmentEvent> testObserver = provider.lifecycle().skip(1).test();
fragment.onAttach(null);
fragment.onCreate(null);
fragment.onViewCreated(null, null);
fragment.onStart();
fragment.onResume();
fragment.onPause();
fragment.onStop();
fragment.onDestroyView();
fragment.onDestroy();
fragment.onDetach();
testObserver.assertValues(
FragmentEvent.ATTACH,
FragmentEvent.CREATE,
FragmentEvent.CREATE_VIEW,
FragmentEvent.START,
FragmentEvent.RESUME,
FragmentEvent.PAUSE,
FragmentEvent.STOP,
FragmentEvent.DESTROY_VIEW,
FragmentEvent.DESTROY,
FragmentEvent.DETACH
);
}
代码示例来源:origin: trello/RxLifecycle
private void testLifecycle(LifecycleProvider<FragmentEvent> provider) {
Fragment fragment = (Fragment) provider;
startFragment(fragment);
TestObserver<FragmentEvent> testObserver = provider.lifecycle().skip(1).test();
fragment.onAttach(null);
fragment.onCreate(null);
fragment.onViewCreated(null, null);
fragment.onStart();
fragment.onResume();
fragment.onPause();
fragment.onStop();
fragment.onDestroyView();
fragment.onDestroy();
fragment.onDetach();
testObserver.assertValues(
FragmentEvent.ATTACH,
FragmentEvent.CREATE,
FragmentEvent.CREATE_VIEW,
FragmentEvent.START,
FragmentEvent.RESUME,
FragmentEvent.PAUSE,
FragmentEvent.STOP,
FragmentEvent.DESTROY_VIEW,
FragmentEvent.DESTROY,
FragmentEvent.DETACH
);
}
代码示例来源:origin: cbeyls/fosdem-companion-android
@Override
public void onDestroyView() {
super.onDestroyView();
holder = null;
}
代码示例来源:origin: cbeyls/fosdem-companion-android
@Override
public void onDestroyView() {
super.onDestroyView();
holder = null;
}
代码示例来源:origin: cbeyls/fosdem-companion-android
@Override
public void onDestroyView() {
super.onDestroyView();
holder = null;
}
代码示例来源:origin: trello/RxLifecycle
TestObserver<Object> stopObserver = observable.compose(provider.bindToLifecycle()).test();
fragment.onDestroyView();
attachObserver.assertNotComplete();
createObserver.assertNotComplete();
代码示例来源:origin: trello/RxLifecycle
TestObserver<Object> stopObserver = observable.compose(provider.bindToLifecycle()).test();
fragment.onDestroyView();
attachObserver.assertNotComplete();
createObserver.assertNotComplete();
代码示例来源:origin: jruesga/rview
@Override
public void onDestroyView() {
super.onDestroyView();
if (mBinding != null) {
mBinding.unbind();
}
}
代码示例来源:origin: h6ah4i/android-tablayouthelper
@Override
public void onDestroyView() {
// release the TabLayoutHelper instance
if (mTabLayoutHelper != null) {
mTabLayoutHelper.release();
mTabLayoutHelper = null;
}
super.onDestroyView();
}
代码示例来源:origin: jruesga/rview
@Override
public final void onDestroyView() {
super.onDestroyView();
mBinding.unbind();
}
}
代码示例来源:origin: jruesga/rview
@Override
public final void onDestroyView() {
super.onDestroyView();
mBinding.unbind();
if (mDialog != null) {
mDialog.dismiss();
}
mDialog = null;
}
代码示例来源:origin: luhaoaimama1/zone-sdk
@Override
public void onDestroyView() {
super.onDestroyView();
bk.unbind();
EventBus.getDefault().unregister(this);
}
代码示例来源:origin: oliexdev/openScale
@Override
public void onDestroyView() {
OpenScale.getInstance().unregisterFragment(this);
super.onDestroyView();
}
代码示例来源:origin: Gwokhov/Deadline
@Override
public void onDestroyView() {
super.onDestroyView();
mViewModel.getAllEvents().removeObservers(this);
}
代码示例来源:origin: oliexdev/openScale
@Override
public void onDestroyView() {
OpenScale.getInstance().unregisterFragment(this);
super.onDestroyView();
}
代码示例来源:origin: MCMrARM/revolution-irc
@Override
public void onDestroyView() {
if (mAdapter != null && mAdapter.hasUnsavedChanges()) {
NotificationRuleManager.saveUserRuleSettings(getActivity());
}
mAdapter = null;
super.onDestroyView();
}
代码示例来源:origin: proninyaroslav/libretorrent
@Override
public void onDestroyView()
{
super.onDestroyView();
FragmentManager fm = getFragmentManager();
if (fm == null)
return;
Fragment fragment = fm.findFragmentByTag(TAG_FETCH_ERROR_DIALOG);
/* Prevents leak the dialog in portrait mode */
if (Utils.isLargeScreenDevice(activity) && fragment != null)
((BaseAlertDialog)fragment).dismiss();
}
代码示例来源:origin: jruesga/rview
@Override
public final void onDestroyView() {
super.onDestroyView();
mBinding.unbind();
if (getActivity() != null && mObserver != null) {
getActivity().getContentResolver().unregisterContentObserver(mObserver);
}
}
内容来源于网络,如有侵权,请联系作者删除!