jimu-decompiled/sources/at/technikum/mti/fancycoverflow/FancyCoverFlowAdapter.java
2025-05-13 19:24:51 +02:00

39 lines
1.6 KiB
Java

package at.technikum.mti.fancycoverflow;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
/* loaded from: classes.dex */
public abstract class FancyCoverFlowAdapter extends BaseAdapter {
public abstract View getCoverFlowItem(int i, View view, ViewGroup viewGroup);
@Override // android.widget.Adapter
public final View getView(int i, View view, ViewGroup viewGroup) {
FancyCoverFlowItemWrapper fancyCoverFlowItemWrapper;
View view2;
FancyCoverFlow fancyCoverFlow = (FancyCoverFlow) viewGroup;
if (view != null) {
fancyCoverFlowItemWrapper = (FancyCoverFlowItemWrapper) view;
view2 = fancyCoverFlowItemWrapper.getChildAt(0);
fancyCoverFlowItemWrapper.removeAllViews();
} else {
fancyCoverFlowItemWrapper = new FancyCoverFlowItemWrapper(viewGroup.getContext());
view2 = null;
}
View coverFlowItem = getCoverFlowItem(i, view2, viewGroup);
if (coverFlowItem == null) {
throw new NullPointerException("getCoverFlowItem() was expected to return a view, but null was returned.");
}
boolean a = fancyCoverFlow.a();
fancyCoverFlowItemWrapper.a(a);
if (a) {
fancyCoverFlowItemWrapper.a(fancyCoverFlow.getReflectionGap());
fancyCoverFlowItemWrapper.a(fancyCoverFlow.getReflectionRatio());
}
fancyCoverFlowItemWrapper.addView(coverFlowItem);
fancyCoverFlowItemWrapper.setLayoutParams(coverFlowItem.getLayoutParams());
return fancyCoverFlowItemWrapper;
}
}