关于如何根据UI的版本把Tab切换成新的Notes UI Component

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/88114082

Sent: Monday, December 29, 2014 5:07 PM

关于如何根据UI的版本把Tab切换成新的Notes UI Component,IconTabBar控件提供了一系列操作下面的item的方法: removeItem(), addItem(), insertItem();

比如可以把新旧两个版本的notes tab都定义在XML View中,New Notes Tab里面就可以放我们定义的notes reuse component:

clipboard1

然后在controller的onBeforeRendering里面根据版本判断,把不需要显示的tab remove掉:
clipboard2

显示Notes Tab:
clipboard3

显示New Notes Tab:
clipboard4

如果用remove item这种方式,被remove的控件就不存在html document里面了,而不是被隐藏掉。
clipboard5

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

猜你喜欢

转载自blog.csdn.net/i042416/article/details/88114082
ui