
回复
1.在项目根目录下的build.gradle文件中,
2.在entry模块的build.gradle文件中,
在sdk6,DevEco Studio2.2 Beta1下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下
使用以下方法来设置top和bottom的关联,可以使点击两个CookieBar空白同时回收,且可同时进行侧滑
当需要点击空白回收的时候,请在rootComponent添加以下方法
xml布局
完整示例 topCookieBar:
bottomCookieBar(不带botton):
bottomCookieBar(带botton的):
关于 CookieTopView
Method | Description |
---|---|
setIcon | 设置CookieBar的icon |
setDuration | 设置CookieBar的回收时间 |
setTitle | 设置CookieBar的Title |
setTitleColor | 设置CookieBar的Title的字体颜色 |
setMessage | 设置CookieBar的Message |
setMessageColor | 设置CookieBar的Message的字体颜色 |
setBackgroundColor | 设置CookieBar的背景颜色 |
startAnimationTopToBottom | CookieBar从上到下开始的动画调用方法 |
startAnimationLeftToRight | 开始CookieBar上方从左到有右的动画调用方法 |
关于 CookieBottomView
Method | Description |
---|---|
setIcon | 设置CookieBar的icon |
setDuration | 设置CookieBar的回收时间 |
setTitle | 设置CookieBar的Title |
setTitleColor | 设置CookieBar的Title的字体颜色 |
setAction | 设置CookieBar的按钮文字 |
setActionColor | 设置CookieBar的action按钮的字体颜色 |
showThreeStatusButton | 是否显示三个状态按钮 |
setNewBtListener | 设置NEW按钮的监听 |
setOpenBtListener | 设置OPEN按钮的监听 |
setSaveBtListener | 设置SAVE按钮的监听 |
setMessage | 设置CookieBar的Message |
setMessageColor | 设置CookieBar的Message的字体颜色 |
setBackgroundColor | 设置CookieBar的背景颜色 |
startAnimationBottomToTop | 开始底部向上的动画调用方法 |
CodeCheck代码测试无异常
CloudTest代码测试无异常
病毒安全检测通过
当前版本demo功能与原组件基本无差异