На одном активити ListView отображается корректно, на другом - нет.
В массиве точно больше одного элемента String
// Получаем массив с категориями:
ArrayList<String> titleCategories = categories[0];
// Находим список, создаем адаптер и присваиваем адаптер списку:
ListView listCategories = (ListView) findViewById(R.id.listCategories);
ArrayAdapter<String> mAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, titleCategories);
listCategories.setAdapter(mAdapter);
в итоге, на экране лишь первый элемент массива. Что я делаю не так? Приведу весь код моей разметки xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_download"
android:id="@+id/button_download"
android:onClick="onClickGetCategories"/>
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="100px"
android:id="@+id/progressBar"
android:layout_gravity="center_horizontal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="..."
android:id="@+id/titleCategory"
android:layout_weight="0.16" />
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listCategories"
style="@style/TestListView"
android:listSelector="@color/background_question_field"
/>
</LinearLayout>
</ScrollView>