得物.apk(点击下载) / CollocationCategoryFragment.java
package com.shizhuang.duapp.modules.productv2.collocation.editor.fragment;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.LiveData;
import androidx.recyclerview.widget.RecyclerView;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.NormalModuleAdapter;
import com.shizhuang.duapp.common.component.recyclerview.GridSpacingItemDecoration;
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.du_mall_common.extension.LiveDataExtensionKt;
import com.shizhuang.duapp.modules.productv2.collocation.editor.model.CollocationProduct;
import com.shizhuang.duapp.modules.productv2.collocation.editor.model.CollocationSearchKeyWordModel;
import com.shizhuang.duapp.modules.productv2.collocation.editor.vm.CollocationAddViewModel;
import j60.z;
import java.util.HashMap;
import java.util.List;
import jn.b;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Reflection;
import org.jetbrains.annotations.NotNull;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/productv2/collocation/editor/fragment/CollocationCategoryFragment;", "Lcom/shizhuang/duapp/modules/productv2/collocation/editor/fragment/CollocationAddBaseFragment;", "<init>", "()V", "du_product_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: CollocationCategoryFragment.kt */
public final class CollocationCategoryFragment extends CollocationAddBaseFragment {
public static ChangeQuickRedirect changeQuickRedirect;
public final String b = "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/bg_collocation_search_category.png";
/* renamed from: c reason: collision with root package name */
public final Lazy f23437c = FragmentViewModelLazyKt.createViewModelLazy(this, Reflection.getOrCreateKotlinClass(CollocationAddViewModel.class), new CollocationCategoryFragment$$special$$inlined$activityViewModels$1(this), new CollocationCategoryFragment$$special$$inlined$activityViewModels$2(this));
public final Function1<CollocationProduct, Unit> d = new CollocationCategoryFragment$onCategoryClick$1(this);
public final NormalModuleAdapter e = new NormalModuleAdapter(false, 1);
public final Lazy f = LazyKt__LazyJVMKt.lazy(new CollocationCategoryFragment$categoryExposureHelper$2(this));
/* renamed from: g reason: collision with root package name */
public HashMap f23438g;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(CollocationCategoryFragment collocationCategoryFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{collocationCategoryFragment, bundle}, null, changeQuickRedirect, true, 290494, new Class[]{CollocationCategoryFragment.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
CollocationCategoryFragment.j(collocationCategoryFragment, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (collocationCategoryFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationCategoryFragment")) {
b.f34396a.fragmentOnCreateMethod(collocationCategoryFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull CollocationCategoryFragment collocationCategoryFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{collocationCategoryFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 290496, new Class[]{CollocationCategoryFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View l = CollocationCategoryFragment.l(collocationCategoryFragment, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (collocationCategoryFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationCategoryFragment")) {
b.f34396a.fragmentOnCreateViewMethod(collocationCategoryFragment, currentTimeMillis, currentTimeMillis2);
}
return l;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(CollocationCategoryFragment collocationCategoryFragment) {
if (!PatchProxy.proxy(new Object[]{collocationCategoryFragment}, null, changeQuickRedirect, true, 290497, new Class[]{CollocationCategoryFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
CollocationCategoryFragment.m(collocationCategoryFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (collocationCategoryFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationCategoryFragment")) {
b.f34396a.fragmentOnResumeMethod(collocationCategoryFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(CollocationCategoryFragment collocationCategoryFragment) {
if (!PatchProxy.proxy(new Object[]{collocationCategoryFragment}, null, changeQuickRedirect, true, 290495, new Class[]{CollocationCategoryFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
CollocationCategoryFragment.k(collocationCategoryFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (collocationCategoryFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationCategoryFragment")) {
b.f34396a.fragmentOnStartMethod(collocationCategoryFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull CollocationCategoryFragment collocationCategoryFragment, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{collocationCategoryFragment, view, bundle}, null, changeQuickRedirect, true, 290498, new Class[]{CollocationCategoryFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
CollocationCategoryFragment.n(collocationCategoryFragment, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (collocationCategoryFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationCategoryFragment")) {
b.f34396a.fragmentOnViewCreatedMethod(collocationCategoryFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
}
public static void j(CollocationCategoryFragment collocationCategoryFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, collocationCategoryFragment, changeQuickRedirect, false, 290483, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void k(CollocationCategoryFragment collocationCategoryFragment) {
if (!PatchProxy.proxy(new Object[0], collocationCategoryFragment, changeQuickRedirect, false, 290485, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View l(CollocationCategoryFragment collocationCategoryFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, collocationCategoryFragment, changeQuickRedirect, false, 290487, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void m(CollocationCategoryFragment collocationCategoryFragment) {
if (!PatchProxy.proxy(new Object[0], collocationCategoryFragment, changeQuickRedirect, false, 290489, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void n(CollocationCategoryFragment collocationCategoryFragment, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, collocationCategoryFragment, changeQuickRedirect, false, 290491, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment
public void _$_clearFindViewByIdCache() {
HashMap hashMap;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290481, new Class[0], Void.TYPE).isSupported && (hashMap = this.f23438g) != null) {
hashMap.clear();
}
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 290480, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f23438g == null) {
this.f23438g = new HashMap();
}
View view = (View) this.f23438g.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i);
this.f23438g.put(Integer.valueOf(i), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290468, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_collocation_search;
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment
public void h(@NotNull CollocationProduct collocationProduct) {
boolean z = PatchProxy.proxy(new Object[]{collocationProduct}, this, changeQuickRedirect, false, 290478, new Class[]{CollocationProduct.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment
public void i(boolean z) {
boolean z4 = PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 290479, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initData() {
LiveData<List<CollocationProduct>> liveData;
LiveData<CollocationSearchKeyWordModel> liveData2;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290469, new Class[0], Void.TYPE).isSupported) {
CollocationAddViewModel o = o();
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], o, CollocationAddViewModel.changeQuickRedirect, false, 290896, new Class[0], LiveData.class);
if (proxy.isSupported) {
liveData = (LiveData) proxy.result;
} else {
liveData = o.f;
}
LiveDataExtensionKt.b(liveData, this, new CollocationCategoryFragment$initData$1(this));
CollocationAddViewModel o12 = o();
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], o12, CollocationAddViewModel.changeQuickRedirect, false, 290907, new Class[0], LiveData.class);
if (proxy2.isSupported) {
liveData2 = (LiveData) proxy2.result;
} else {
liveData2 = o12.f23459v;
}
liveData2.observe(this, new CollocationCategoryFragment$initData$2(this));
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
Context context;
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 290471, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290475, new Class[0], Void.TYPE).isSupported && (context = getContext()) != null) {
((DuImageLoaderView) _$_findCachedViewById(R.id.categoryBg)).i(this.b).d0(300).p0(DuScaleType.FIT_XY).x();
this.e.getDelegate().C(CollocationProduct.class, 3, null, -1, true, null, null, new CollocationCategoryFragment$initCategory$1(this, context));
z.b.a((RecyclerView) _$_findCachedViewById(R.id.recyclerViewCategory), fi.b.b((float) 2), null);
float f12 = (float) 9;
((RecyclerView) _$_findCachedViewById(R.id.recyclerViewCategory)).addItemDecoration(new GridSpacingItemDecoration(3, fi.b.b(f12), fi.b.b(f12), true));
((RecyclerView) _$_findCachedViewById(R.id.recyclerViewCategory)).setLayoutManager(this.e.getGridLayoutManager(context));
((RecyclerView) _$_findCachedViewById(R.id.recyclerViewCategory)).setAdapter(this.e);
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290472, new Class[0], Void.TYPE).isSupported) {
z.b.a((FrameLayout) _$_findCachedViewById(R.id.searchLayoutBg), fi.b.b((float) 2), Integer.valueOf(Color.parseColor("#26ffffff")));
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.etSearch), 0, new CollocationCategoryFragment$initSearchLayout$1(this), 1);
}
}
}
public final CollocationAddViewModel o() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290466, new Class[0], CollocationAddViewModel.class);
return (CollocationAddViewModel) (proxy.isSupported ? proxy.result : this.f23437c.getValue());
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 290482, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 290486, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void onCreateViewBefore(@org.jetbrains.annotations.Nullable Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 290470, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreateViewBefore(bundle);
o().a(true);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public /* synthetic */ void onDestroyView() {
super.onDestroyView();
_$_clearFindViewByIdCache();
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void onEmptyButtonClick() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290477, new Class[0], Void.TYPE).isSupported) {
super.onEmptyButtonClick();
o().a(true);
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void onNetErrorRetryClick() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290476, new Class[0], Void.TYPE).isSupported) {
super.onNetErrorRetryClick();
o().a(true);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290488, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 290484, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, com.shizhuang.duapp.modules.productv2.collocation.editor.fragment.CollocationAddBaseFragment, androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 290490, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
}