128 lines
4.6 KiB
Java
128 lines
4.6 KiB
Java
|
package com.scb.phone.view.adapter;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.view.View;
|
||
|
import android.view.animation.AlphaAnimation;
|
||
|
import android.widget.ImageView;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.Unbinder;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import com.scb.phone.R;
|
||
|
import o.AbstractC5347brN;
|
||
|
import o.fJM;
|
||
|
import o.pvT;
|
||
|
import o.pyT;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public abstract class BaseExpandableRecycleViewAdapter extends pvT {
|
||
|
public Context b;
|
||
|
|
||
|
@Override // o.Qpt
|
||
|
public final long a(int i) {
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
@Override // o.Qpt
|
||
|
public int b(int i) {
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
@Override // o.Qpt
|
||
|
public final long d(int i) {
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class BaseParentViewHolder_ViewBinding implements Unbinder {
|
||
|
private BaseParentViewHolder b;
|
||
|
|
||
|
public BaseParentViewHolder_ViewBinding(BaseParentViewHolder baseParentViewHolder, View view) {
|
||
|
this.b = baseParentViewHolder;
|
||
|
baseParentViewHolder.expandIcon = (ImageView) pyT.e(view, R.id.expand_icon_image_view, "field 'expandIcon'", ImageView.class);
|
||
|
baseParentViewHolder.expandedDiamond = (ImageView) pyT.a(view, R.id.expanded_diamond_image_view, "field 'expandedDiamond'", ImageView.class);
|
||
|
baseParentViewHolder.expandedLine = view.findViewById(R.id.expanded_line_view);
|
||
|
}
|
||
|
|
||
|
@Override // butterknife.Unbinder
|
||
|
public void a() {
|
||
|
BaseParentViewHolder baseParentViewHolder = this.b;
|
||
|
if (baseParentViewHolder == null) {
|
||
|
throw new IllegalStateException("Bindings already cleared.");
|
||
|
}
|
||
|
this.b = null;
|
||
|
baseParentViewHolder.expandIcon = null;
|
||
|
baseParentViewHolder.expandedDiamond = null;
|
||
|
baseParentViewHolder.expandedLine = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public BaseExpandableRecycleViewAdapter(Context context) {
|
||
|
this.b = context;
|
||
|
setHasStableIds(true);
|
||
|
}
|
||
|
|
||
|
public boolean b(RecyclerView.zJl zjl) {
|
||
|
return zjl instanceof BaseParentViewHolder;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static class BaseParentViewHolder extends AbstractC5347brN {
|
||
|
|
||
|
@BindView
|
||
|
public ImageView expandIcon;
|
||
|
|
||
|
@BindView
|
||
|
public ImageView expandedDiamond;
|
||
|
|
||
|
@BindView
|
||
|
public View expandedLine;
|
||
|
|
||
|
public BaseParentViewHolder(View view) {
|
||
|
super(view);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static void a(BaseParentViewHolder baseParentViewHolder) {
|
||
|
int i = baseParentViewHolder.c.b;
|
||
|
if ((Integer.MIN_VALUE & i) != 0) {
|
||
|
boolean z = (i & 8) != 0;
|
||
|
boolean z2 = (i & 4) != 0;
|
||
|
if (z) {
|
||
|
fJM.b(baseParentViewHolder.expandIcon);
|
||
|
if (z2) {
|
||
|
if (baseParentViewHolder.expandedDiamond != null) {
|
||
|
baseParentViewHolder.expandedDiamond.setVisibility(0);
|
||
|
}
|
||
|
if (baseParentViewHolder.expandedLine != null) {
|
||
|
baseParentViewHolder.expandedLine.setVisibility(0);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, BitmapDescriptorFactory.HUE_RED);
|
||
|
alphaAnimation.setDuration(500L);
|
||
|
if (baseParentViewHolder.expandedDiamond != null) {
|
||
|
baseParentViewHolder.expandedDiamond.startAnimation(alphaAnimation);
|
||
|
baseParentViewHolder.expandedDiamond.setVisibility(8);
|
||
|
}
|
||
|
AlphaAnimation alphaAnimation2 = new AlphaAnimation(1.0f, BitmapDescriptorFactory.HUE_RED);
|
||
|
alphaAnimation2.setDuration(500L);
|
||
|
if (baseParentViewHolder.expandedLine != null) {
|
||
|
baseParentViewHolder.expandedLine.startAnimation(alphaAnimation2);
|
||
|
baseParentViewHolder.expandedLine.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
baseParentViewHolder.expandIcon.setImageResource(z2 ? R.drawable.ic_expand_less_black_24dp : R.drawable.ic_expand_more_black_24dp);
|
||
|
if (baseParentViewHolder.expandedDiamond != null) {
|
||
|
baseParentViewHolder.expandedDiamond.setVisibility(z2 ? 0 : 8);
|
||
|
}
|
||
|
if (baseParentViewHolder.expandedLine != null) {
|
||
|
baseParentViewHolder.expandedLine.setVisibility(z2 ? 0 : 8);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|