|
|
@@ -76,7 +76,7 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
|
|
|
private TextView textTopView;
|
|
|
private TextView textBottomView;
|
|
|
- private ImageView weahterView;
|
|
|
+ private ImageView weatherIcon;
|
|
|
private ViewGroup layoutWeatherBottom;
|
|
|
|
|
|
@Override
|
|
|
@@ -84,14 +84,14 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
weather = itemView.findViewById(R.id.layout_container_weather);
|
|
|
textTopView = itemView.findViewById(R.id.text_weather_top);
|
|
|
textBottomView = itemView.findViewById(R.id.text_weather_bottom);
|
|
|
- weahterView = itemView.findViewById(R.id.icon_weather);
|
|
|
+ weatherIcon = itemView.findViewById(R.id.icon_weather);
|
|
|
layoutWeatherBottom = itemView.findViewById(R.id.layout_weather_bottom);
|
|
|
|
|
|
int statusBarHeight = ResourceUtil.getStatusBarHeightManual();
|
|
|
|
|
|
// 첫 번째 카테고리 내용이 약간 가려지도록 일정 높이를 조절한다.
|
|
|
ViewGroup.LayoutParams params = itemView.getLayoutParams();
|
|
|
- params.height = SuperModel.getInstance().getScreenHeight() - ResourceUtil.dpToPx(330);
|
|
|
+ params.height = SuperModel.getInstance().getScreenHeight() - ResourceUtil.getDimension(R.dimen.main_contents_first_image_height);
|
|
|
// itemView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
|
|
|
|
|
initWeatherY = ResourceUtil.getDimension(R.dimen.main_contents_weather_margin_top) + statusBarHeight;
|
|
|
@@ -108,8 +108,8 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
// Keyframe kf1 = Keyframe.ofFloat(.5f, 360f);
|
|
|
// Keyframe kf2 = Keyframe.ofFloat(1f, 0f);
|
|
|
// PropertyValuesHolder pvhRotation = PropertyValuesHolder.ofKeyframe("rotation", kf0, kf1, kf2);
|
|
|
-// ObjectAnimator rotationAnim = ObjectAnimator.ofPropertyValuesHolder(weahterView, pvhRotation);
|
|
|
- ObjectAnimator rotationAnim = ObjectAnimator.ofFloat(weahterView, "rotation", 0f, 360f);
|
|
|
+// ObjectAnimator rotationAnim = ObjectAnimator.ofPropertyValuesHolder(weatherIcon, pvhRotation);
|
|
|
+ ObjectAnimator rotationAnim = ObjectAnimator.ofFloat(weatherIcon, "rotation", 0f, 360f);
|
|
|
rotationAnim.setDuration(17000);
|
|
|
rotationAnim.setInterpolator(new LinearInterpolator());
|
|
|
rotationAnim.setRepeatCount(Animation.INFINITE);
|
|
|
@@ -117,23 +117,23 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
rotationAnim.start();
|
|
|
|
|
|
if (AnimatorManager.getInstance().isCompleted() == false) {
|
|
|
- weahterView.setTranslationY(100f);
|
|
|
- ObjectAnimator weatherAnimator = ObjectAnimator.ofFloat(weahterView, "translationY", 0f);
|
|
|
+ weatherIcon.setTranslationY(100f);
|
|
|
+ ObjectAnimator weatherAnimator = ObjectAnimator.ofFloat(weatherIcon, "translationY", 0f);
|
|
|
weatherAnimator.setDuration(500);
|
|
|
weatherAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
@Override
|
|
|
public void onAnimationCancel(Animator animation) {
|
|
|
- weahterView.setTranslationY(0f);
|
|
|
+ weatherIcon.setTranslationY(0f);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- weahterView.setAlpha(0f);
|
|
|
- ObjectAnimator weatherAlphaAnimator = ObjectAnimator.ofFloat(weahterView, "alpha", 1f);
|
|
|
+ weatherIcon.setAlpha(0f);
|
|
|
+ ObjectAnimator weatherAlphaAnimator = ObjectAnimator.ofFloat(weatherIcon, "alpha", 1f);
|
|
|
weatherAlphaAnimator.setDuration(800);
|
|
|
weatherAlphaAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
@Override
|
|
|
public void onAnimationCancel(Animator animation) {
|
|
|
- weahterView.setAlpha(1f);
|
|
|
+ weatherIcon.setAlpha(1f);
|
|
|
}
|
|
|
});
|
|
|
|