我知道可以创建自定义UI元素(通过视图或特定的UI元素扩展)。但是,是否可以为新创建的UI元素定义新的属性或属性(我的意思是不是继承的,而是全新的,以定义一些我无法使用默认属性或属性处理的特定行为)
例如,元素我的自定义元素:
<com.tryout.myCustomElement
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Element..."
android:myCustomValue=<someValue>
/>
那么是否可以定义MyCustomValue呢?
Thx
https://stackoverflow.com/questions/7608464
复制相似问题