XML : Android

I've attempted to write/implement an include/merge in my layout using:

However it does not seem to merge the two layouts - I see nothing (no TextView) just the initial layout without the "merge" layout on top of it.

Source: main.xml

  <?xml version="1.0" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="fill_parent"      android:layout_height="fill_parent"      android:orientation="vertical" >        <include layout="@layout/titlebar" />        <com.ex.CoverFlow          android:id="@+id/coverflow"          android:layout_width="fill_parent"          android:layout_height="fill_parent" >      </com.cb.CoverFlow>    </LinearLayout>    

Source: titlebar.xml

  <?xml version="1.0" encoding="utf-8"?>  <merge xmlns:android="http://schemas.android.com/apk/res/android" >        <TextView          android:layout_width="fill_parent"          android:layout_height="wrap_content"          android:text="THIS"          android:textColor="#1E90FF"          android:textSize="450sp" />    </merge>    

From:

http://developer.android.com/training/improving-layouts/reusing-layouts.html

No comments:

Post a Comment