提交 88f74c50 编写于 作者: O openharmony_ci 提交者: Gitee

!431 ui list限制开发者重复设置adapter

Merge pull request !431 from guyuanzhang/adapter
......@@ -497,8 +497,12 @@ bool UIList::MoveChildStep(int16_t distance)
void UIList::SetAdapter(AbstractAdapter* adapter)
{
recycle_.SetAdapter(adapter);
recycle_.InitRecycle();
if (recycle_.adapter_ == nullptr) {
recycle_.SetAdapter(adapter);
recycle_.InitRecycle();
} else {
GRAPHIC_LOGE("UIList::SetAdapter adapter can only set once");
}
}
UIView* UIList::GetSelectView()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册