Question: I have a problem with wraping the `img`, when `div` is expanded on button click. Without styles of `myDiv` it wraps ok.

HTML:

```
<div>
    <img width='300px' src='http://freefunnydogpictures.com/wp-content/uploads/2014/05/picture_1400053660.jpg'/>
    <div class='myDiv'>Утверждён Перечень сельскохозяйственной продукции, сырья и продовольствия, страной происхождения которых являются Соединенные Штаты Америки, страны Европейского союза,... 
    </div>
</div>
<button id='myButton'>Click</button>

```

JavaScript:

```
$(document).ready(function(){
    $('#myButton').click(function(){
        $('.myDiv').height(500);
    });
});

```

CSS:

```
img{
    float:left;
}

.myDiv{
    height:100px;
    overflow:hidden;
}

```

<http://jsfiddle.net/pfodox/z05cwh5g/>.

Answer: 
Indices are 0-based, so you should write `listEditText.requestFocus(list.size() - 1);`.

`list.Size()` is the smallest index (greater than 0) that is off the end of the list.
Okay, everyone seems to be missing that you have a *list* of `EditText` views. `requestFocus(int)` expects a direction, not an index. The documentation for this:

> 
> Call this to try to give focus to a specific view or to one of its
>  descendants and give it a hint about what direction focus is heading.
>  A view will not actually take focus if it is not focusable
>  (isFocusable() returns false), or if it is focusable and it is not
>  focusable in touch mode (isFocusableInTouchMode()) while the device is
>  in touch mode. See also focusSearch(int), which is what you call to
>  say that you have focus, and you want your parent to look for the next
>  one. This is equivalent to calling requestFocus(int, Rect) with null
>  set for the previously focused rectangle.
> 
> 
> Parameters direction One of FOCUS\_UP, FOCUS\_DOWN, FOCUS\_LEFT, and
>  FOCUS\_RIGHT Returns Whether this view or one of its descendants
>  actually took focus.
> 
> 
> 

You need to resolve the last EditText in your list:

```
listOfEditTexts.get(listOfEditTexts.length() - 1).requestFocus();

```