I can not understand what is happening and how we brought lists of friends.

listFrands = (ListView) findViewById(R.id.listView);//Инициализация переменной вывода друзей VKRequest request = VKApi.friends().get(VKParameters.from(VKApiConst. FIELDS,"first_name,last_name"));//Выводит начальное и конечное имя request.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); VKList list = (VKList) response.parsedModel; ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(MainActivity.this,android.R.layout.simple_expandable_list_item_1,list); listFrands.setAdapter(arrayAdapter); 

    1 answer 1

    1. We initialize the variable of type ListView, finding this markup element by ID.
    2. We form a request to the API for its method "friends" with the parameters of the first and last name
    3. We execute the query by assigning the listener to perform it.
    4. In the latter, we get a list of VKList data from a server response.
    5. We create an adapter for display in the ListView, passing the context, markup for the list item and the list of data from item 4 to it.
    6. Assigning the created ListView adapter