alibaba / Tangram-Android

Tangram is a modular UI solution for building native page dynamically including Tangram for Android, Tangram for iOS and even backend CMS. This project provides the sdk on Android.

Home Page:http://tangram.pingguohe.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

hhgRepertory opened this issue · comments

{
"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"
}
]
}

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

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