-
Notifications
You must be signed in to change notification settings - Fork 257
XML升级到2.3.0以上版本的检查工具
zhenglibao edited this page Nov 13, 2019
·
1 revision
如果之前使用的是2.3.0以前版本,现在要升级到2.3.0或以上版本时,由于yoga布局引擎发生了变动,可能会导致一些非正规的写法在新版本上工作不正常,可以使用下面的链接指向的工具进行检查: https://raw.githubusercontent.com/zhenglibao/FlexLib/master/Doc/res/FlexChecker
用法: ./FlexChecker 源代码目录
如果有问题,将会保存到当前目录下的xmloutput.txt中,类似如下:
xml=BGRCompletionPorjectController.xml attr=FlexNode: view=FlexTouchView, name=(null), layout=(
"flex=1"
), viewattr=(
"bgColor=#FFFFFF"
), onpresschangeProjectDesc
xml=BGInterviewResultDetailView.xml attr=FlexNode: view=FlexScrollView, name=(null), layout=(
"flex=1"
), viewattr=(
"vertScroll=true",
"vertIndicator=false"
), onpress(null)
每一段标记出对应的xml文件中有循环依赖的节点
Flexbox Introduction & performance (in Chinese)
Tutorial 1: Create View Controller with xml layout
Tutorial 2: Create Table Cell with xml layout
Tutorial 3: Embed xml layout into traditional view hierarchy
Tutorial 4: Use custom view in xml layout
Tutorial 5: Create reusable view using xml layout file