Browse Source

[스플래시][Bug] 디버그 모드에서 앱 종료시 에러 발생되는 현상 수정

hyodong.min 6 năm trước cách đây
mục cha
commit
48b8f2bbc9

+ 7 - 4
app/src/dev/java/kr/co/zumo/app/lifeplus/view/screen/splash/SplashFragment.java

@@ -47,6 +47,12 @@ public class SplashFragment extends SplashDebugFragment {
     return inflater.inflate(R.layout.test_layout, container, false);
   }
 
+  @Override
+  protected void onAfterDestroyView() {
+    super.onAfterDestroyView();
+    stopTimer();
+  }
+
   /***********************************
    * debug
    ***********************************/
@@ -157,10 +163,7 @@ public class SplashFragment extends SplashDebugFragment {
       disposable = Completable.timer(3000, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())
         .subscribe(() -> {
           stopTimer();
-          try {
-            findViewById(R.id.button_next).setEnabled(false);
-          } catch (Exception ignored) {
-          }
+          findViewById(R.id.button_next).setEnabled(false);
           presenter.onClickNextScreen();
         });
     }