通过定义一个子类在XML类中自定义视图

以下是我自定义的类

<view
   class="com.productions.sample.TextCustom"
// more...
/>

子类

public class TextCustom extends TextView {
        // Stuff.
    }

我想实现的是

public final class Custom {
        public class TextCustom extends TextView {
        // Stuff.
        }
        public class ScrollCustom extends ScrollView {
        // Stuff.
        }
    }

请问在XML文件中能同时定义子类吗?

使用$符号作为一个定界符

<view class="com.productions.sample.Custom$TextCustom" />