androidx.fragment.app.Fragment.onResume()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中androidx.fragment.app.Fragment.onResume()方法的一些代码示例,展示了Fragment.onResume()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.onResume()方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称:Fragment
方法名:onResume

Fragment.onResume介绍

暂无

代码示例

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void onResume() {
  super.onResume();
}

代码示例来源:origin: trello/RxLifecycle

@Override
public void onResume() {
  super.onResume();
  lifecycleSubject.onNext(FragmentEvent.RESUME);
}

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void onResume() {
  super.onResume();
  checkAndUpdate();
}

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void onResume() {
  super.onResume();
  Timber.d("onResume()");
  refreshInterface(true);
}

代码示例来源:origin: ybq/Android-SpinKit

@Override
public void onResume() {
  super.onResume();
  mWaveDrawable.start();
  mCircleDrawable.start();
  mChasingDotsDrawable.start();
}

代码示例来源:origin: guardianproject/haven

@Override
public void onResume() {
  super.onResume();
  // if (cameraViewHolder == null)
    initCamera();
  cameraViewHolder.setMotionSensitivity(prefs.getCameraSensitivity());
}

代码示例来源:origin: wdullaer/MaterialDateTimePicker

@Override
public void onResume() {
  super.onResume();
  DatePickerDialog dpd = (DatePickerDialog) requireFragmentManager().findFragmentByTag("Datepickerdialog");
  if(dpd != null) dpd.setOnDateSetListener(this);
}

代码示例来源:origin: wdullaer/MaterialDateTimePicker

@Override
public void onResume() {
  super.onResume();
  TimePickerDialog tpd = (TimePickerDialog) requireFragmentManager().findFragmentByTag("Timepickerdialog");
  if(tpd != null) tpd.setOnTimeSetListener(this);
}

代码示例来源:origin: westnordost/StreetComplete

@Override public void onResume()
{
  super.onResume();
  compass.onResume();
  if(mapView != null) mapView.onResume();
}

代码示例来源: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: trello/RxLifecycle

private void testBindUntilEvent(LifecycleProvider<FragmentEvent> provider) {
  Fragment fragment = (Fragment) provider;
  startFragment(fragment);
  TestObserver<Object> testObserver = observable.compose(provider.bindUntilEvent(STOP)).test();
  fragment.onAttach(null);
  testObserver.assertNotComplete();
  fragment.onCreate(null);
  testObserver.assertNotComplete();
  fragment.onViewCreated(null, null);
  testObserver.assertNotComplete();
  fragment.onStart();
  testObserver.assertNotComplete();
  fragment.onResume();
  testObserver.assertNotComplete();
  fragment.onPause();
  testObserver.assertNotComplete();
  fragment.onStop();
  testObserver.assertComplete();
}

代码示例来源:origin: trello/RxLifecycle

private void testBindUntilEvent(LifecycleProvider<FragmentEvent> provider) {
  Fragment fragment = (Fragment) provider;
  startFragment(fragment);
  TestObserver<Object> testObserver = observable.compose(provider.bindUntilEvent(STOP)).test();
  fragment.onAttach(null);
  testObserver.assertNotComplete();
  fragment.onCreate(null);
  testObserver.assertNotComplete();
  fragment.onViewCreated(null, null);
  testObserver.assertNotComplete();
  fragment.onStart();
  testObserver.assertNotComplete();
  fragment.onResume();
  testObserver.assertNotComplete();
  fragment.onPause();
  testObserver.assertNotComplete();
  fragment.onStop();
  testObserver.assertComplete();
}

代码示例来源:origin: trello/RxLifecycle

TestObserver<Object> startObserver = observable.compose(provider.bindToLifecycle()).test();
fragment.onResume();
attachObserver.assertNotComplete();
createObserver.assertNotComplete();

代码示例来源:origin: trello/RxLifecycle

TestObserver<Object> startObserver = observable.compose(provider.bindToLifecycle()).test();
fragment.onResume();
attachObserver.assertNotComplete();
createObserver.assertNotComplete();

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public void onResume()
{
  super.onResume();
  if (listPeerState != null && layoutManager != null)
    layoutManager.onRestoreInstanceState(listPeerState);
}

代码示例来源:origin: TUM-Dev/Campus-Android

@Override
public void onResume() {
  super.onResume();
  if (event != null) {
    initBuyOrShowTicket(event);
  }
}

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public void onResume()
{
  super.onResume();
  if (listFileState != null && layoutManager != null)
    layoutManager.onRestoreInstanceState(listFileState);
}

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public void onResume()
{
  super.onResume();
  if (torrentsListState != null)
    layoutManager.onRestoreInstanceState(torrentsListState);
}

代码示例来源:origin: Sparker0i/Weather

@Override
  public void onResume() {
    changeCity(preferences.getCity());
    super.onResume();
  }
}

相关文章