APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:JioFiberPartner
版本号:5.2.0
包名称:com.jfp.prod

MD5 校验值:7cd346351ab05a28e42aff65173e0141

反编译源代码说明

ShowNwEAdapter.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.leptonsoftware.fibernet.adapters;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.jfp.prod.R;
import com.leptonsoftware.fibernet.Interfaces;
import com.leptonsoftware.fibernet.datamodel.NetworkLayer;
import com.leptonsoftware.fibernet.util.AppConstants;
import com.leptonsoftware.fibernet.util.EventType;
import com.squareup.picasso.Picasso;
import java.util.List;

public class ShowNwEAdapter extends RecyclerView.g<ViewHolder> {
    private Context ctx;
    private final Interfaces.OnListFragmentInteractionListener mListener;
    public final List<NetworkLayer> mValues;

    public class ViewHolder extends RecyclerView.d0 {
        public final CheckBox chk_element;
        public final ImageView iv_icon;
        public NetworkLayer mItem;
        public final View mView;
        public final TextView tv_title;

        public ViewHolder(View view) {
            super(view);
            this.mView = view;
            this.tv_title = (TextView) view.findViewById(R.id.tv_title);
            this.iv_icon = (ImageView) view.findViewById(R.id.iv_icon);
            this.chk_element = (CheckBox) view.findViewById(R.id.chk_element);
        }

        @Override
        public String toString() {
            return super.toString() + " '" + ((Object) this.tv_title.getText()) + "'";
        }
    }

    public ShowNwEAdapter(Context context, List<NetworkLayer> list, Interfaces.OnListFragmentInteractionListener onListFragmentInteractionListener) {
        this.mValues = list;
        this.mListener = onListFragmentInteractionListener;
        this.ctx = context;
    }

    @Override
    public int getItemCount() {
        return this.mValues.size();
    }

    @Override
    public void onBindViewHolder(final ViewHolder viewHolder, int i10) {
        viewHolder.mItem = this.mValues.get(i10);
        viewHolder.tv_title.setText(this.mValues.get(i10).getLayerTitle());
        viewHolder.chk_element.setChecked(this.mValues.get(i10).isSelected());
        viewHolder.iv_icon.setVisibility(0);
        Picasso.with(this.ctx).load("https://jfp.jio.com/mobile/Content/Images/icons/lib/big/" + this.mValues.get(i10).getLayerName().trim() + AppConstants.IMG_EXT).into(viewHolder.iv_icon);
        viewHolder.chk_element.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                boolean z9 = !viewHolder.mItem.isSelected();
                viewHolder.mItem.setSelected(z9);
                viewHolder.chk_element.setChecked(z9);
                ShowNwEAdapter.this.notifyDataSetChanged();
            }
        });
        viewHolder.mView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (ShowNwEAdapter.this.mListener != null) {
                    boolean z9 = !viewHolder.mItem.isSelected();
                    viewHolder.mItem.setSelected(z9);
                    viewHolder.chk_element.setChecked(z9);
                    ShowNwEAdapter.this.notifyDataSetChanged();
                    ShowNwEAdapter.this.mListener.onListFragmentInteraction(EventType.SHOW_NETWORK_ELEMENT, viewHolder.mItem);
                }
            }
        });
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i10) {
        return new ViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.show_nw_e_item, viewGroup, false));
    }
}