Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
AdvancedSnackBar
app
gradle/wrapper
image
.gitattributes
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

AdvancedSnackBar

Introduction:

The advanced addon on SnackBar Use Google's latest Material Design 2.0 style.

Useage:

1.Compile it on your project:

(Project)build.gradle:

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

(app)build.gradle:

dependencies {
	        implementation 'com.github.DiseR-LawnX:AdvancedSnackBar:0.1.3'
	}

2.Code:

final CoordinatorLayout contaier = findViewById(R.id.container);
FloatingActionButton fab = findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                AdvancedSnackBar snackbar = new AdvancedSnackBar(contaier,AdvancedSnackBar.LENGTH_LONG,MainActivity.this);
                snackbar.setDesign(AdvancedSnackBar.DESIGN_MATERIAL);
				/*DESIGN_MATERIAL:Material Design 2.0 Style
				DESIGN_ORIGINAL: Original Style*/
                snackbar.setText("This is a Snackbar");
                snackbar.setBackgroundColor("#000000");
                snackbar.setTextSize(18);
                snackbar.setElevation(4.0f);
                snackbar.addButton("Button", new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        //Any Code
                    }
                });
                snackbar.setBackgroundDrawable(R.drawable.design_snackbar_material_background);
                snackbar.setMargin(12,12,12,12);
                snackbar.show();
            }
        });

Preview:

preview

Thanks for your use enjoy it!

You can’t perform that action at this time.