Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

使用编译工具编译vvtest.xml,使用编译生成的byte数组无法渲染出View #83

Open
WoXinfeiyang opened this issue Jul 11, 2019 · 0 comments

Comments

@WoXinfeiyang
Copy link

按照《编译工具使用》教程,使用编译工具编译vvtest.xml,使用编译生成的byte数组VVTEST#BIN无法渲染出View,但是使用demo中的VVTEST#BIN是可以正常渲染出View的。

vvtest.xml为:

<FrameLayout
        flag="flag_exposure|flag_clickable"
        action="action"
        layoutWidth="match_parent"
        layoutHeight="84rp"
        background="#FFFFFF">

    <NImage
            layoutWidth="48rp"
            layoutHeight="48rp"
            layoutMarginLeft="34rp"
            layoutGravity="left|v_center"
            src="${imgUrl}"
            scaleType="center_crop"
    />
    <NText
            layoutWidth="wrap_content"
            layoutHeight="wrap_content"
            layoutMarginLeft="94rp"
            text="${title}"
            layoutGravity="left|v_center"
            textSize="28rp"
            textColor="#555555"
    />
    <NText
            layoutWidth="wrap_content"
            layoutHeight="wrap_content"
            layoutMarginRight="50rp"
            layoutGravity="right|v_center"
            textSize="28rp"
            text="${subtitle}"
            textColor="${subtitleColor}"/>
    <NImage
            layoutWidth="14rp"
            layoutHeight="30rp"
            layoutMarginRight="28rp"
            layoutGravity="right|v_center"
            src="${arrowImgUrl}"
            scaleType="center_crop"
    />

    <NLine
            layoutWidth="680rp"
            layoutHeight="1rp"
            orientation="H"
            layoutGravity="h_center|bottom"
            src="${lineImgUrl}"
            color="#999999"
    />
</FrameLayout>

config.properties文件如下

#
# MIT License
#
# Copyright (c) 2018 Alibaba Group
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

VIEW_ID_FrameLayout=1
VIEW_ID_VHLayout=2
VIEW_ID_VH2Layout=3
VIEW_ID_GridLayout=4
VIEW_ID_FlexLayout=5
VIEW_ID_RatioLayout=6
VIEW_ID_NText=7
VIEW_ID_VText=8
VIEW_ID_NImage=9
VIEW_ID_VImage=10
VIEW_ID_TMVirtualImage=11
VIEW_ID_TMNImage=12
VIEW_ID_NLine=13
VIEW_ID_VLine=14
VIEW_ID_Scroller=15
VIEW_ID_Page=16
VIEW_ID_Grid=17
VIEW_ID_VH=18
VIEW_ID_Slider=19
VIEW_ID_VirtualTime=20
VIEW_ID_VGraph=21
VIEW_ID_Progress=22
VIEW_ID_VirtualContainer=23
VIEW_ID_Var=24
VIEW_ID_NFrameLayout=25
VIEW_ID_NGridLayout=26
VIEW_ID_NRatioLayout=27
VIEW_ID_NVH2Layout=28
VIEW_ID_NVHLayout=29
DEFAULT_PROPERTY_TotalContainer=native
VIEW_ID_TotalContainer=1010
flag=Flag
type=Type
layoutGravity=Align
gravity=Align
layoutWidth=LayoutWidthHeight
layoutHeight=LayoutWidthHeight
textStyle=TextStyle
dataMode=DataMode
visibility=Visibility
filterWhiteBg=Bool
flexDirection=Enum<row:0,row-reverse:1,column:2,column-reverse:3>
flexWrap=Enum<wrap:1,nowrap:0,wrap-reverse:2>
justifyContent=Enum<flex-start:0,flex-end:1,center:2,space-between:3,space-around:4>
alignItems=Enum<flex-start:0,flex-end:1,center:2,baseline:3,stretch:4>
alignContent=Enum<flex-start:0,flex-end:1,center:2,space-between:3,space-around:4,stretch:5>
layoutDirection=Enum<left:1,right:4,top:2,bottom:8>
scaleType=Enum<center:5,center_crop:6,center_inside:7,fit_center:3,fit_end:4,fit_start:2,fit_xy:1,matrix:0>
mode=Enum<staggeredGrid:2,linear:1>
style=Enum<solid:1,dash:2>
orientation=Enum<H:1,V:0>
animatorStyle=Enum<linear:0,decelerate:1,accelerate:2,accelerateDecelerate:3,spring:4>
layoutOrientation=Enum<normal:0,reverse:1>
ellipsize=Enum<start:0,marquee:3,middle:1,end:2,none:-1>
autoDimDirection=Enum<X:1,Y:2>
paintStyle=Enum<stroke:1,fill:2>
ratio=Float
borderWidth=Float
borderRadius=Float
borderTopLeftRadius=Float
borderTopRightRadius=Float
borderBottomLeftRadius=Float
borderBottomRightRadius=Float
lineSpaceMultiplier=Float
lineSpaceExtra=Float
borderColor=Color
color=Color
background=Color
textColor=Color
maskColor=Color
onPageFlip=Expr
onAutoRefresh=Expr
onScroll=Expr
onClick=Expr
onLongClick=Expr
onBeforeDataLoad=Expr
onAfterDataLoad=Expr
onSetData=Expr
disableCache=Number
flexGrow=Number
itemWidth=Number
itemHeight=Number
itemVerticalMargin=Number
itemHorizontalMargin=Number
layoutMargin=Number
layoutMarginLeft=Number
layoutMarginRight=Number
layoutMarginTop=Number
layoutMarginBottom=Number
itemMargin=Number
paintWidth=Number
layoutRatio=Number
span=Number
textSize=Number
lineHeight=Number
disablePlaceHolder=Number
fixBy=Number
padding=Number
paddingLeft=Number
paddingRight=Number
paddingTop=Number
paddingBottom=Number
autoDimX=Number
autoDimY=Number
alpha=Number
initValue=Number
diameterX=Number
diameterY=Number
order=Int
id=Int
uuid=Int
minWidth=Int
minHeight=Int
blurRadius=Int
maxLines=Int
supportSticky=Int
supportHTMLStyle=Int
autoRefreshThreshold=Int
lineSpace=Int
firstSpace=Int
lastSpace=Int
autoSwitch=Int
containerID=Int
canSlide=Int
stayTime=Int
animatorTime=Int
autoSwitchTime=Int
colCount=Int
lines=Int
action=String
src=String
text=String

其中

action=String
src=String
text=String

是新增的3个属性

templatelist.properties文件如下:

#
# MIT License
#
# Copyright (c) 2018 Alibaba Group
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

ntext=NText,1
vtext=VText,1
nimage=NImage,1
vimage=VImage,1
nline=NLine,1
vline=VLine,1
progress=Progress,1
vgraph=VGraph,1
page=Page,1
page_item=PageItem,1
page_script=PageScrollScript,1
slider=Slider,1
slider_item=SliderItem,1
framelayout=FrameLayout,1
ratiolayout=RatioLayout,1
gridlayout=GridLayout,1
grid=Grid,1
grid_item=GridItem,1
vhlayout=VHLayout,1
vh2layout=VH2Layout,1
vh=VH,1
scroll_vl=ScrollerVL,1
scroll_vs=ScrollerVS,1
scroll_h=ScrollerH,1
totalcontainer=TotalContainer,1
click_script=ClickScript,1
tmall_component_1=TmallComponent1,1
tmall_component_2=TmallComponent2,1
tmall_component_3=TmallComponent3,1
tmall_component_4=TmallComponent4,1
tmall_component_5=TmallComponent5,1
tmall_component_6=TmallComponent6,1
tmall_component_7=TmallComponent7,1
tmall_component_8=TmallComponent8,1
debug=Debug,1
nframelayout=NFrameLayout,1
ngridlayout=NGridLayout,1
nratiolayout=NRatioLayout,1
nvh2layout=NVH2Layout,1
nvhlayout=NVHLayout,1
vvtest=VVTEST,1

其中最后一行"vvtest=VVTEST,1"是后续增加的,请问是哪个文件没有配置正确,为什么使用demo中vvtest.xml对应的byte数据就没有问题可以正常渲染View?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant