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

结合VirtualView 的Scrooler实现横向可滑动的列表, 使用engine.addCardLoadSupport加载数据却是竖直排列的,但是直接在data.json中写,又是横向排列的。 #180

Open
hhgRepertory opened this issue Sep 29, 2019 · 2 comments

Comments

@hhgRepertory
Copy link

{
"type": "container-scroll",
"header": {
"type": "BLXHeader1",
"style": {
"margin": [
0,
0,
8,
0
]
},
"title": "每日领券",
"subhead": "每日领券,优惠领不停",
"text_more": "查看更多",
"icon_go_right": "http://192.168.1.5:8080/icon/icon_go_right.png"
},
"load": "com.blx.coupon.scroller",
"loadType": "-1",
"style": {
"pageRatio": 1,
"pageWidth": "400rp",
"pageHeight": "140rp",
"bgColor": "#ffffff",
"scrollMarginLeft": "0",
"itemRatio": "2.2",
"scrollMarginRight": "0",
"hGap": "8",
"margin": [
8,
8,
0,
8
],
"padding": [
8,
8,
8,
8
]
},
"items": [
{
"type": "BLXCouponItem",
"titleText": "¥30代金券",
"titleTextColor": "#333333",
"titleTextSize": "26rp",
"subText": "限定生活缴费(水.电)使用",
"subTextColor": "#666666",
"subTextSize": "18rp"
},
{
"type": "BLXCouponItem",
"titleText": "¥100火锅抵用券",
"titleTextColor": "#333333",
"titleTextSize": "26rp",
"subText": "限定商家使用",
"subTextColor": "#666666",
"subTextSize": "18rp"
},
{
"type": "BLXCouponItem",
"titleText": "¥5购物券",
"titleTextColor": "#333333",
"titleTextSize": "26rp",
"subText": "限红旗连锁使用",
"subTextColor": "#666666",
"subTextSize": "18rp"
}
]
}

@Zengyonghao
Copy link

我也遇到了这个问题 走了一遍debug 没有item的情况下 banner压根没有创建viewpager 异步设置banner以后 viewholder也是直接创建的item的viewholder 并没有去创建viewpager的holder

@Zengyonghao
Copy link

目前我只能获取到bannerItem之后 再生成card进行一次性的插入

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

2 participants