A simple android library to show message on the screen.This library based on CookieBar
android 6.0 4.0 ## Usage ### Gradledependencies {
compile 'com.mnock:msnackbar:1.0.2'
}
<dependency>
<groupId>com.mnock</groupId>
<artifactId>msnackbar</artifactId>
<version>1.0.2</version>
<type>pom</type>
</dependency>
new MSnackBar.Builder(MainActivity.this)
.setTitle(R.string.cookie_title)
.setMessage(R.string.cookie_message)
.setDuration(3000)
.setTitleSizeTextSize(25)
.setMessageTextSize(18)
.setActionTextSize(15)
.setBackgroundColor(R.color.colorPrimary)
.setActionColor(R.color.colorAccent)
.setTitleColor(android.R.color.white)
.setAction(R.string.cookie_action, new OnActionClickListener() {
@Override
public void onClick() {
Toast.makeText(getApplicationContext(), "点击后,我更帅了!", Toast.LENGTH_LONG).show();
}
})
.show();
//.show(view);