(int yPos)
| 332 | } |
| 333 | |
| 334 | protected int getElementIndexAt(int yPos) { |
| 335 | int end = getItemCount() - 1; |
| 336 | if (end < 0) { |
| 337 | return -1; |
| 338 | } |
| 339 | int begin = 0; |
| 340 | while (end - begin > 1) { |
| 341 | int index = (end + begin) >> 1; |
| 342 | if (itemLayoutY.length <= index) { |
| 343 | index = itemLayoutY.length - 1; |
| 344 | } |
| 345 | if (yPos < itemLayoutY[index]) { |
| 346 | end = index; |
| 347 | } else { |
| 348 | begin = index; |
| 349 | } |
| 350 | } |
| 351 | return (yPos < itemLayoutY[end]) ? begin : end; |
| 352 | } |
| 353 | |
| 354 | public int win_top; // верхняя граница окна относительно списка |
| 355 | public int winHeight; // отображаемый размер списка |
no test coverage detected