Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.liuguangqiang.cookie:library

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.liuguangqiang.cookie:library

CookieBar is a lightweight library for showing a brief message at the top or bottom of the screen.

  • 1.0.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

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

<dependency>
  <groupId>com.liuguangqiang.cookie</groupId>
  <artifactId>CookieBar</artifactId>
  <version>1.0.1</version>
  <type>pom</type>
</dependency>

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.

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
   <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>
</style>
  • 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 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.

FAQs

Package last updated on 31 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc