1

I am looking at android documentation and if I want to use include and merge.

So I opened up eclipse and got it to extract some of the code out and it made in my layout this

 <include layout="@layout/progressbar"  android:layout_width="wrap_content" android:layout_height="wrap_content"/>

and another file with

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
    <TextView android:text="Loading..." android:layout_height="wrap_content" android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/lblLoading" android:layout_marginLeft="180dp" android:layout_marginTop="240dp"></TextView>
    <ProgressBar android:id="@+id/progBar" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="130dp" android:layout_marginTop="230dp"></ProgressBar>
</merge>

Yet when I try to do this in monodroid I get errors saying it can't find merge and include.

1
  • Do you have "warnings as errors" enabled? For code completion, Mono for Android includes an XSD for .axml files, and the XSD doesn't specify <include/> or <merge/>, and thus Visual Studio will generate a warning when those are used. Mono for Android doesn't care about them, though, and passes them through to aapt.
    – jonp
    Aug 11, 2011 at 17:41

2 Answers 2

1

Do you have "warnings as errors" enabled? For code completion, Mono for Android includes an XSD for .axml files, and the XSD doesn't specify <include/> or <merge/>, and thus Visual Studio will generate a warning when those are used. Mono for Android doesn't care about them, though, and passes them through to aapt.

It would be useful if you could provide the exact error message.

0

try using

<ProgressBar android:progress.....

And continue, its more along the lines of messing around with different options.

1
  • I think the progress bar code works. I want to use the same code in multiple areas. However it won't let me use the include to do this.
    – chobo2
    Aug 10, 2011 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.