I create custom view based on LinearLayout. Class extends the LinearLayout class, in layout I have:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<merge>
some staff here
</merge>
</layout>
Android Studio shows the the warning Element merge is not allowed here
, but app works.
What's wrong?
I believe it's just a glitch in Android studio. Even the official documentation has merge
as a direct child of layout
: https://developer.android.com/topic/libraries/data-binding/index.html
Edit: I filed a bug there: https://code.google.com/p/android/issues/detail?id=286406&thanks=286406&ts=1490873944
Edit2: Bug is fixed \o/ in AS 3.5 Canary 12
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With