You can extend LinearLayout, or extend a ViewGroup class (which is what all standard layouts extend). In layout xml you can declare it as a custom view:
<com.example.MyLayout
adnroid:layout_width="..."
... >
</com.example.MyLayout>
My problem was that inflater ignored all children under my custom layout. Maybe I did something wrong, and you will be luckier :) In the worst scenario you may have a separate layout xml for children and add it programmatically after inflating.
Embedding your own layout into Android system is not a good practice for a mere reason that in that case you will have to supply a modified Android system to all users of your app :)