Custom Listview from JSON
<p>I want to show 2 pieces of data in 1 row of ListView, but I got stuck.</p>

<p>My problem is in <code>showList()</code> method. I can't use my custom ListView XML to show 2 data, I can only show 1 data. I want to show <code>item</code> and <code>itemsemail</code> array in my custom ListView not only <code>item</code>. </p>

<p>Here is my custom ListView adapter code...</p>

<pre><code>private void getDosen() {
    //Ketika Aplikasi mengambil data kita akan melihat progress dialog
    final ProgressDialog loading = ProgressDialog.show(this,"Mengambil Data","Mohon tunggu..",false,false);
    //Logging Interceptor
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
    //set Level Log
    logging.setLevel(HttpLoggingInterceptor.Level.BODY);
    OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
    httpClient.addInterceptor(logging);

    Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(ROOT_URL)
            .addConverterFactory(GsonConverterFactory.create())//GsonConverter untuk parsing json
            .client(httpClient.build())
            .build();

    RestAPI service = retrofit.create(RestAPI.class);

    Call&lt;Model&gt; call = service.loadListDosen();
    call.enqueue(new Callback&lt;Model&gt;() {  //Asyncronous Request
        @Override
        public void onResponse(Call&lt;Model&gt; call, Response&lt;Model&gt; response) {
            loading.dismiss();
            List&lt;Listdosen&gt; dosen = response.body().getListdosen();

            //memasukkan data dari varibel dosen ke dosens
            dosens = dosen;
            //memanggil method untuk menampilkan list
            showList();
        }

        @Override
        public void onFailure(Call&lt;Model&gt; call, Throwable t) {

        }
    });
}

private void showList() {
    //String array untuk menyimpan nama semua nama dosen
    String[] items = new String[dosens.size()];
    String[] itemsemail = new String[dosens.size()];

    for (int i = 0; i &lt; dosens.size(); i++) {
        items[i] = dosens.get(i).getNama();
        itemsemail[i] = dosens.get(i).getEmail();

    }
    //Membuat Array Adapter for listview
    ArrayAdapter adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.activity_dosen_listview, items);

    //setting adapter untuk listview

    listview.setAdapter(adapter);
}
</code></pre>