|
|
@@ -79,16 +79,14 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
private ViewGroup weather;
|
|
|
|
|
|
private TextView textTopView;
|
|
|
- private TextView textBottomView;
|
|
|
private ImageView weatherIcon;
|
|
|
private ViewGroup layoutWeatherBottom;
|
|
|
|
|
|
@Override
|
|
|
public void init(int index, MainContentsBean bean, IEventListener listener) {
|
|
|
weather = itemView.findViewById(R.id.layout_container_weather);
|
|
|
- textTopView = itemView.findViewById(R.id.text_weather_top);
|
|
|
- textBottomView = itemView.findViewById(R.id.text_weather_bottom);
|
|
|
weatherIcon = itemView.findViewById(R.id.icon_weather);
|
|
|
+ textTopView = itemView.findViewById(R.id.text_weather_top);
|
|
|
layoutWeatherBottom = itemView.findViewById(R.id.layout_weather_bottom);
|
|
|
|
|
|
int statusBarHeight = ResourceUtil.getStatusBarHeightManual();
|
|
|
@@ -101,7 +99,9 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
initWeatherY = ResourceUtil.getDimension(R.dimen.main_contents_weather_margin_top) + statusBarHeight;
|
|
|
itemView.setPadding(itemView.getPaddingLeft(), (int) initWeatherY, itemView.getPaddingRight(), itemView.getPaddingBottom());
|
|
|
initY = 0; //itemView.getY(); //getScreenY(itemView);
|
|
|
- weather.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.CLICK).build());});
|
|
|
+ weatherIcon.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.CLICK).build());});
|
|
|
+ textTopView.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.CLICK).build());});
|
|
|
+ layoutWeatherBottom.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.CLICK).build());});
|
|
|
Log.i("APP# MainContentsWeatherHolder | init", "|" + " initY: " + initY + " initWeatherY: " + initWeatherY + ", this: " + this);
|
|
|
|
|
|
animate();
|
|
|
@@ -113,6 +113,7 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
// Keyframe kf2 = Keyframe.ofFloat(1f, 0f);
|
|
|
// PropertyValuesHolder pvhRotation = PropertyValuesHolder.ofKeyframe("rotation", kf0, kf1, kf2);
|
|
|
// ObjectAnimator rotationAnim = ObjectAnimator.ofPropertyValuesHolder(weatherIcon, pvhRotation);
|
|
|
+
|
|
|
ObjectAnimator rotationAnim = ObjectAnimator.ofFloat(weatherIcon, "rotation", 0f, 360f);
|
|
|
rotationAnim.setDuration(17000);
|
|
|
rotationAnim.setInterpolator(new LinearInterpolator());
|