Titelzeile + Fusszeile (IncludeOtherLayout)

M

mcpd

Neues Mitglied
0
Hallo Leute,
ich habe mal eine gezielte Frage zur Layoutgestaltung. Folgendes möchte ich erreichen:
Oben soll sich ein Bild befinden und unten eine Button-Leiste. In der Mitte soll sich das dynamische Layout befinden. Titelzeile wie auch Buttonleiste möchte ich über "IncludeOtherLayout" einbinden.

Folgender XML-Code der main-Datei:

Code:
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
[LEFT] android:layout_height="fill_parent"
 android:padding="6dip">[/LEFT]
 
<ImageView
[LEFT] android:layout_width="wrap_content" 
 android:layout_height="wrap_content"
 android:layout_marginRight="6dip"
 android:src="@drawable/icon"
 android:id="@+id/imgPic">
</ImageView>[/LEFT]
 
<LinearLayout
[LEFT] android:orientation="vertical"
 android:layout_width="0dip"
 android:layout_weight="1"
 android:layout_height="wrap_content">
 <TextView
   android:textSize="20px"
   android:layout_gravity="center_vertical"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:id="@+id/txtViewSelect"
   android:text="Auswahl"
   android:layout_weight="1">
 </TextView>
 <TextView
   android:ellipsize="marquee"
   android:textSize="10px"
   android:layout_width="wrap_content"
   android:singleLine="true"
   android:layout_height="wrap_content"
   android:id="@+id/txtViewShortDescription"
   android:text="Kurzbeschreibung"
   android:layout_weight="1">
 </TextView>
</LinearLayout> 
</LinearLayout>[/LEFT]

Das ist das Layout im mittleren Teil. Wo binde ich jetzt die Titelzeile und die Fusszeile ein? Danke für Eure Tipps und Infos.​

Gruß​

mcpd​
 
Einfach ein vertikales LinearLayout "außenrum" bauen und dann mit <include>

also ungefähr so:

<LinearLayout android: orientation="vertical"...>
<include layout="@layout/kopzeile">

dann dein layout

<include layout="@layout/fusszeile">
</LinearLayout>

"kopfzeile" und "fusszeile" sind wiederum xml-layouts in den entsprechenden Dateien.
 
Danke für Deine Antwort. Ich werde das gleich mal ausprobieren. Melde mich dann wieder zurück.

Gruß
mcpd
 
Zurück
Oben Unten