Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liuguangqiang/cookiebar
CookieBar is a lightweight library for showing a brief message at the top or bottom of the screen.
https://github.com/liuguangqiang/cookiebar
android animation cookie snackbar toast ui
Last synced: 3 days ago
JSON representation
CookieBar is a lightweight library for showing a brief message at the top or bottom of the screen.
- Host: GitHub
- URL: https://github.com/liuguangqiang/cookiebar
- Owner: liuguangqiang
- Created: 2017-03-03T13:39:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-08T03:02:56.000Z (over 4 years ago)
- Last Synced: 2024-11-08T06:43:40.826Z (5 days ago)
- Topics: android, animation, cookie, snackbar, toast, ui
- Language: Java
- Homepage:
- Size: 416 KB
- Stars: 508
- Watchers: 14
- Forks: 56
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cookie [![Build Status](https://travis-ci.org/liuguangqiang/SwipeBack.png?branch=master)](https://travis-ci.org/liuguangqiang/CookieBar)
==============================================
CookieBar is a lightweight library for showing a brief message at the top or bottom of the screen.## Screenshot
## Usage
### Gradle```
dependencies {
implementation 'com.liuguangqiang.cookie:CookieBar:1.0.1'
}
```### Maven
```com.liuguangqiang.cookie
CookieBar
1.0.1
pom```
## A simple CookieBar.
```
new CookieBar.Builder(MainActivity.this)
.setTitle("TITLE")
.setMessage("MESSAGE")
.show();
```## A CookieBar with a icon and a action button.
```
new CookieBar.Builder(MainActivity.this)
.setTitle("TITLE")
.setIcon(R.mipmap.ic_launcher)
.setMessage("MESSAGE")
.setAction("ACTION", new OnActionClickListener() {
@Override
public void onClick() {
}
})
.show();
```## You can change the default style by set the Theme's attributes.
```
<item name="cookieTitleColor">@color/default_title_color</item>
<item name="cookieMessageColor">@color/default_message_color</item>
<item name="cookieActionColor">@color/default_action_color</item>
<item name="cookieBackgroundColor">@color/default_bg_color</item>```
## Or dynamically change the style with a cookie builder.
* layoutGravity
* backgroundColor
* titleColor
* messageColor
* actionColor
* duration## New Features
#### 1.0.0
* The action button could be replaced by a icon.## License
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 athttp://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.