|
|
@@ -4,9 +4,11 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.main;
|
|
|
|
|
|
import android.animation.ObjectAnimator;
|
|
|
+import android.annotation.SuppressLint;
|
|
|
import android.content.Context;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.util.Log;
|
|
|
+import android.util.TypedValue;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.ImageView;
|
|
|
@@ -124,10 +126,12 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
|
|
|
|
|
|
private ImageView weatherIcon;
|
|
|
private ViewGroup layoutWeatherBottom;
|
|
|
+ private ViewGroup layoutText;
|
|
|
|
|
|
private boolean isImagePlaying = false;
|
|
|
private int drawable;
|
|
|
|
|
|
+ @SuppressLint("NewApi")
|
|
|
@Override
|
|
|
public void init(int index, MainContentsBean bean, IEventListener listener) {
|
|
|
weather = itemView.findViewById(R.id.layout_container_weather);
|
|
|
@@ -135,6 +139,7 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
|
|
|
textTopView = itemView.findViewById(R.id.text_weather_top);
|
|
|
textBottomView = itemView.findViewById(R.id.text_weather_bottom);
|
|
|
layoutWeatherBottom = itemView.findViewById(R.id.layout_weather_bottom);
|
|
|
+ layoutText = itemView.findViewById(R.id.layout_text);
|
|
|
|
|
|
int statusBarHeight = ResourceUtil.getStatusBarHeightManual();
|
|
|
|
|
|
@@ -147,8 +152,13 @@ public class MainContentsWeatherHolder extends MainContentsHolder {
|
|
|
itemView.setPadding(itemView.getPaddingLeft(), (int) initWeatherY, itemView.getPaddingRight(), itemView.getPaddingBottom());
|
|
|
initY = 0; //itemView.getY(); //getScreenY(itemView);
|
|
|
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());});
|
|
|
+ layoutText.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.CLICK).build());});
|
|
|
+ TypedValue outValue = new TypedValue();
|
|
|
+ itemView.getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true);
|
|
|
+ layoutText.setForeground(ResourceUtil.getDrawable(itemView.getContext(),outValue.resourceId));
|
|
|
+ weatherIcon.setForeground(ResourceUtil.getDrawable(itemView.getContext(),outValue.resourceId));
|
|
|
+// 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);
|
|
|
|
|
|
setWeatherGifAndText(weatherCode, dustCode);
|