public static int getPositionForView(@NonNull final AbsListView absListView, @NonNull final View view) {
    """
	Returns the position within the adapter's dataset for the view, where view is an adapter item or a descendant of an adapter item.
	Unlike {@link AdapterView#getPositionForView(android.view.View)}, returned position will reflect the position of the item given view is representing,
	by subtracting the header views count.
	
	@param absListView the ListView containing the view.
	@param view        an adapter item or a descendant of an adapter item. This must be visible in given AdapterView at the time of the call.
	
	@return the position of the item in the AdapterView represented by given view, or {@link AdapterView#INVALID_POSITION} if the view does not
	correspond to a list item (or it is not visible).
    """
        int position = absListView.getPositionForView(view);
        if (absListView instanceof ListView) {
            position -= ((ListView) absListView).getHeaderViewsCount();
        }
        return position;
    }
public static int getPositionForView(@NonNull final AbsListView absListView, @NonNull final View view) {
        int position = absListView.getPositionForView(view);
        if (absListView instanceof ListView) {
            position -= ((ListView) absListView).getHeaderViewsCount();
        }
        return position;
    }
public static int getPositionForView ( @ NonNull final AbsListView absListView , @ NonNull final View view ) { int position = absListView . getPositionForView ( view ) ; if ( absListView instanceof ListView ) { position -= ( ( ListView ) absListView ) . getHeaderViewsCount ( ) ; } return position ; }
Returns the position within the adapter's dataset for the view, where view is an adapter item or a descendant of an adapter item.
Unlike {@link AdapterView#getPositionForView(android.view.View)}, returned position will reflect the position of the item given view is representing,
by subtracting the header views count.

@param absListView the ListView containing the view.
@param view        an adapter item or a descendant of an adapter item. This must be visible in given AdapterView at the time of the call.

@return the position of the item in the AdapterView represented by given view, or {@link AdapterView#INVALID_POSITION} if the view does not
correspond to a list item (or it is not visible).
Returns the position within the adapter s dataset for the view where view is an adapter item or a descendant of an adapter item . Unlike { @link AdapterView#getPositionForView ( android . view . View ) } returned position will reflect the position of the item given view is representing by subtracting the header views count .