Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to click on view #49

Open
jigar1211 opened this issue Sep 7, 2020 · 3 comments
Open

Not able to click on view #49

jigar1211 opened this issue Sep 7, 2020 · 3 comments

Comments

@jigar1211
Copy link

Kindly check my code below:

I am not able to find click listener

+++++++++++++++++++

private static class TestHeaderColumnViewHolder extends ViewHolderImpl {

    TextView tvTitle, tvAddToCartCompare;
    ImageView ivProduct, ivRemove;


    private TestHeaderColumnViewHolder(@NonNull View itemView) {
        super(itemView);
        tvTitle = itemView.findViewById(R.id.tvTitle);
        tvAddToCartCompare = itemView.findViewById(R.id.tvAddToCartCompare);
        ivProduct = itemView.findViewById(R.id.ivProduct);
        ivRemove = itemView.findViewById(R.id.ivRemove);

    }

    public void bind(TestHeaderColumnViewHolder vh, int column) {
        tvTitle.setText(arrayListOfItem.get(column - 1).getProduct_name());
        Glide.with(getItemView().getContext()).load(arrayListOfItem.get(column - 1).getProduct_image()).into(ivProduct);
        **tvAddToCartCompare.setOnClickListener(view -> {


                assert addtocartClickListner != null;
                addtocartClickListner.addToCart(view, arrayListOfItem.get(column - 1), arrayListOfItem.get(column - 1).get_id());

        });**
        **ivRemove.setOnClickListener(view -> {

                assert removeCompareClickLisner != null;
                removeCompareClickLisner.removeFromCart(view, arrayListOfItem.get(column - 1), arrayListOfItem.get(column - 1).get_id());

        });**
    }
}

+++++++++++++++++++

Kindly help me with solution

Thanks

@dieunguyenantony
Copy link

Same problem

@dieunguyenantony
Copy link

in file AdaptiveTableLayout find function onInterceptTouchEvent: return false

@Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        // intercept event before OnClickListener on item view.
        mScrollHelper.onTouch(ev);
        return false;
    }

@jigar1211
Copy link
Author

Any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants