59 lines
2.3 KiB
Java
59 lines
2.3 KiB
Java
package com.lytefast.flexinput.adapters;
|
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import androidx.annotation.IdRes;
|
|
import androidx.annotation.LayoutRes;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import d0.z.d.m;
|
|
/* compiled from: EmptyListAdapter.kt */
|
|
public class EmptyListAdapter extends RecyclerView.Adapter<ViewHolder> {
|
|
private final int actionBtnId;
|
|
private final int itemLayoutId;
|
|
private final View.OnClickListener onClickListener;
|
|
|
|
/* compiled from: EmptyListAdapter.kt */
|
|
public final class ViewHolder extends RecyclerView.ViewHolder {
|
|
public final View a;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public ViewHolder(EmptyListAdapter emptyListAdapter, View view) {
|
|
super(view);
|
|
m.checkNotNullParameter(view, "itemView");
|
|
View findViewById = view.findViewById(EmptyListAdapter.access$getActionBtnId$p(emptyListAdapter));
|
|
m.checkNotNullExpressionValue(findViewById, "itemView.findViewById(actionBtnId)");
|
|
this.a = findViewById;
|
|
}
|
|
}
|
|
|
|
public EmptyListAdapter(@LayoutRes int i, @IdRes int i2, View.OnClickListener onClickListener) {
|
|
m.checkNotNullParameter(onClickListener, "onClickListener");
|
|
this.itemLayoutId = i;
|
|
this.actionBtnId = i2;
|
|
this.onClickListener = onClickListener;
|
|
}
|
|
|
|
public static final /* synthetic */ int access$getActionBtnId$p(EmptyListAdapter emptyListAdapter) {
|
|
return emptyListAdapter.actionBtnId;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public int getItemCount() {
|
|
return 1;
|
|
}
|
|
|
|
public void onBindViewHolder(ViewHolder viewHolder, int i) {
|
|
m.checkNotNullParameter(viewHolder, "holder");
|
|
viewHolder.a.setOnClickListener(this.onClickListener);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
m.checkNotNullParameter(viewGroup, "parent");
|
|
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(this.itemLayoutId, viewGroup, false);
|
|
m.checkNotNullExpressionValue(inflate, "view");
|
|
return new ViewHolder(this, inflate);
|
|
}
|
|
}
|