Browse Source

[BUG]
- 메인 새로고침 시 날씨 애니메이션 중복 현상 수정

yeongyun 6 years ago
parent
commit
25511cd023

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/main/MainContentsAdapter.java

@@ -140,6 +140,7 @@ public class MainContentsAdapter extends RecyclerView.Adapter<MainContentsHolder
   }
 
   public void update(List<MainContentsBean> data) {
+    pause();
     this.data = data;
     notifyDataSetChanged();
   }

+ 4 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/main/MainContentsWeatherHolder.java

@@ -169,6 +169,7 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
 //    playToggleInterval();
 
     isImagePlaying = false;
+
     setWeatherVisible(itemView.getY());
 
     if (false == animated ) {
@@ -363,6 +364,7 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
     stopToggleInterval();
     setWeatherGifAndText(weatherCode, dustCode);
     isImagePlaying = false;
+
     setWeatherVisible(itemView.getY());
 
   }
@@ -374,7 +376,9 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
   }
 
   public void stopInterval() {
+    clearWeather();
     stopToggleInterval();
+    AnimatorManager.getInstance().clear();
   }
 
 }

+ 0 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/main/MainFragment.java

@@ -422,8 +422,6 @@ public class MainFragment extends FragmentBase<MainPresenter> implements IMainVi
 
     @Override
     public void refresh() {
-        Log.i("TAGG", "refresh");
-        adapter.refresh();
         scrollToTop();
         presenter.renderWeather();
         actionBarScroller.scroll(-1000);

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/main/TextFading.java

@@ -3,6 +3,7 @@
  */
 package kr.co.zumo.app.lifeplus.view.screen.main;
 
+import android.util.Log;
 import android.view.View;
 import android.view.ViewPropertyAnimator;
 import android.widget.TextView;