
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源
去关联
CookieBar是一个轻量级的库,用于在屏幕顶部或底部显示简短的消息。
添加har包到lib文件夹内
在entry的gradle内添加如下代码
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
implementation project(':library')
implementation 'io.openharmony.tpc.thirdlib:CookieBar:1.0.2'
new CookieBar.Builder(MainActivity.this)
.setTitle("TITLE")
.setMessage("MESSAGE")
.show();
new CookieBar.Builder(MainActivity.this)
.setTitle("TITLE")
.setIcon(R.mipmap.ic_launcher)
.setMessage("MESSAGE")
.setAction("ACTION", new OnActionClickListener() {
@Override
public void onClick() {
}
})
.show();
{
"color":[
{
"name":"default_bg_color",
"value":"#BDBDBD"
},
{
"name":"default_title_color",
"value":"#ffffff"
},
{
"name":"default_message_color",
"value":"#ffffff"
},
{
"name":"white",
"value":"#ffffff"
},
{
"name":"default_action_color",
"value":"#26a69a"
}
]
}
Copyright 2017 Eric Liu
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.