得物.apk(点击下载) / RdLogisticTrackView.java


package com.shizhuang.duapp.modules.aftersale.refund.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.aftersale.refund.model.LogisticTrackModel;
import com.shizhuang.duapp.modules.du_mall_common.widget.DuIconsTextView;
import fi.b;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.JvmOverloads;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u0007\u0012\b\b\u0002\u0010\t\u001a\u00020\u0003¢\u0006\u0004\b\n\u0010\u000bJ\b\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\f"}, d2 = {"Lcom/shizhuang/duapp/modules/aftersale/refund/view/RdLogisticTrackView;", "Lcom/shizhuang/duapp/modules/aftersale/refund/view/RdBaseView;", "Lcom/shizhuang/duapp/modules/aftersale/refund/model/LogisticTrackModel;", "", "getLayoutId", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: RdLogisticTrackView.kt */
public final class RdLogisticTrackView extends RdBaseView<LogisticTrackModel> {
    public static ChangeQuickRedirect changeQuickRedirect;
    public HashMap e;

    @JvmOverloads
    public RdLogisticTrackView(@NotNull Context context) {
        this(context, null, 0, 6);
    }

    @JvmOverloads
    public RdLogisticTrackView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, 0, 4);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ RdLogisticTrackView(Context context, AttributeSet attributeSet, int i, int i3) {
        this(context, (i3 & 2) != 0 ? null : attributeSet, (i3 & 4) != 0 ? 0 : i);
    }

    public View _$_findCachedViewById(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 63397, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.e == null) {
            this.e = new HashMap();
        }
        View view = (View) this.e.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.e.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    @Override // com.shizhuang.duapp.common.component.module.AbsModuleView
    public int getLayoutId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 63394, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_refund_logistic_track_view;
    }

    @Override // com.shizhuang.duapp.common.component.module.AbsModuleView
    public void onChanged(Object obj) {
        LogisticTrackModel logisticTrackModel = (LogisticTrackModel) obj;
        if (!PatchProxy.proxy(new Object[]{logisticTrackModel}, this, changeQuickRedirect, false, 63395, new Class[]{LogisticTrackModel.class}, Void.TYPE).isSupported) {
            super.onChanged(logisticTrackModel);
            ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBackground)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/order_op_logisctic_bg.png").p0(DuScaleType.CENTER_CROP).R((float) b.b((float) 2)).x();
            ((DuImageLoaderView) _$_findCachedViewById(R.id.ivIcon)).i(logisticTrackModel.getIconUrl()).x();
            ((TextView) _$_findCachedViewById(R.id.tvTitle)).setText(logisticTrackModel.getExpressCurrentTitle());
            ((TextView) _$_findCachedViewById(R.id.tvDesc)).setText(logisticTrackModel.getExpressCurrentInfo());
            ((DuIconsTextView) _$_findCachedViewById(R.id.tvTime)).setText(logisticTrackModel.getExpressLastedDateStr());
            ViewExtensionKt.j(this, 0, new RdLogisticTrackView$onChanged$1(this, logisticTrackModel), 1);
        }
    }

    @Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver, com.shizhuang.duapp.modules.aftersale.refund.view.RdBaseView
    public void onExposure(@Nullable DuExposureHelper.State state) {
        if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 63396, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) {
            super.onExposure(state);
            LogisticTrackModel logisticTrackModel = (LogisticTrackModel) getData();
            if (logisticTrackModel != null) {
                Pair[] pairArr = new Pair[3];
                String expressCurrentTitle = logisticTrackModel.getExpressCurrentTitle();
                String str = "";
                if (expressCurrentTitle == null) {
                    expressCurrentTitle = str;
                }
                pairArr[0] = TuplesKt.to(PushConstants.TITLE, expressCurrentTitle);
                String expressCurrentInfo = logisticTrackModel.getExpressCurrentInfo();
                if (expressCurrentInfo == null) {
                    expressCurrentInfo = str;
                }
                pairArr[1] = TuplesKt.to("text", expressCurrentInfo);
                String expressLastedDateStr = logisticTrackModel.getExpressLastedDateStr();
                if (expressLastedDateStr != null) {
                    str = expressLastedDateStr;
                }
                pairArr[2] = TuplesKt.to("time", str);
                b("物流节点", CollectionsKt__CollectionsJVMKt.listOf(MapsKt__MapsKt.mapOf(pairArr)));
            }
        }
    }

    @JvmOverloads
    public RdLogisticTrackView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
    }
}