У меня есть строка массива, которая добавляется к ярлыку идентификатора abc.xml и textview
this.setListAdapter(new ArrayAdapter<String>(this, R.layout.abc,R.id.label, days));
В моем файле abc.xml у меня есть относительный макет для отображения навигационной панели, только один раз.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#4C4646"
>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout02" android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#3E3D3D"
android:paddingRight="3dp"
android:paddingLeft="3dp"
>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/back_listing"
android:background="@drawable/android_back_button"
android:layout_marginTop="6dp">
</Button>
<TextView android:id="@+id/search_label"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:layout_toRightOf="@+id/back_listing"
android:layout_toLeftOf="@+id/search_submit"
android:textSize="20px"
android:text="Nav Bar"
android:layout_marginTop="7dp"
android:layout_marginLeft="45dp"
android:layout_gravity="right"
android:textStyle="bold"/>
/>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/search_submit"
android:layout_alignParentRight="true"
android:background="@drawable/android_forward_button"
android:layout_marginTop="6dp"
>
</Button>
</RelativeLayout>
, а затем
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px"
android:textSize="15px"
android:id="@+id/label"
>
, который заполняет текстовое представление списком массивов
Но проблема у меня естьесли в верхней части отображается панель навигации, за которой следует первый элемент в моем списке массивов, затем снова следует панель навигации, затем второй элемент из моего списка массивов, затем панель навигации, это происходит до конца списка массивов.Также как будто navbar находится в цикле с моим arraylist.Теперь, когда я снимаю содержимое относительного макета (навигационная панель), оставляя текстовое представление, оно отлично отображается, но, конечно, я хочу, чтобы навигационная панель отображалась один раз, поверх.