how to get positon of the selected/clicked rating bar in a list of rating bars
<p>How can I get positon of the selected rating bar in a list of rating bars inside rating bar listener which is in a recyclerview adapter as shown in below code?
I am able to get the individual ratings of each rating bar when the user clicks it but I cant tell which rating bar the user I have clicked since there is no method of getting position of a particular rating bar in a list. I have placed the rating bar inside an adapter which populates the list in the recycler view as shown in the code below. I am using <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjymfOg6YPMAhVMuhoKHafWAyQQFggdMAA&amp;url=https%3A%2F%2Fgithub.com%2Ftechery%2FProperRatingBar&amp;usg=AFQjCNH61mIQ0ifkxk8iT0KABU-XpusUlQ&amp;sig2=HO5dUGpPVvX4bbhCqUV4PA" rel="nofollow">this</a> library for the rating bar. and here is my code of the adapter where i have placed my listener, how can i get the position of the rating bar the user has selected inside my rating bar listener </p>

<pre><code>    @Override
    public RateMa3Adapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
//        create a new view
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.rate, viewGroup, false);

        view.setOnClickListener(RateMa3.myOnClickListener);
        ViewHolder viewHolder = new ViewHolder(view);
        rootView = view;
        ButterKnife.bind(this, view);
        lowerRatingBar.setListener(ratingListener);

        return viewHolder;
    }

    private RatingListener ratingListener = new RatingListener() {
        @Override
        public void onRatePicked(ProperRatingBar ratingBar) {

            Snackbar.make(rootView,
                    String.format("Rating is %d " , ratingBar.getRating()),
                    Snackbar.LENGTH_SHORT).show();

            Log.e("Rate", ratingBar.getRating() + "  rating");

// HOW CAN I GET THE POSITION OF A RATING BAR THE USER HAS CLICKED IN HERE?? THATS MY QUESTION, SINCE I HAVE A LIST OF RATING BARS
        }
    };
</code></pre>