Skip to content

nikialeksey/FullScreenDialog

Repository files navigation

BCH compliance Codacy Badge codebeat badge codecov Build Status Dependency Status 0pdd

License: MIT API Download

FullScreenDialog

Implementation of full-screen-dialogs from material guidelines.

Video description

Add to project

repositories {
    jcenter()
}

dependencies {
    ...
    compile('com.nikialeksey:fullscreendialog:<latest version>@aar') {
        transitive true
    }
    ...
}

Usage

new DissmissOnActionDialog(
    new DismissOnCloseDialog(
        new FsDialog(
            context, 
            R.style.AppTheme,
            new FsDialogToolbar(context, "Title",
                new FsCloseButton(
                    new SimpleButton(
                        new ClickListener() {
                            @Override
                            public void onClick() {
                                Toast.makeText(context, "Close", Toast.LENGTH_LONG).show();
                            }
                        }), 
                        closeIcon),
                new FsActionButton(
                    new SimpleButton(
                        new ClickListener() {
                            @Override
                            public void onClick() {
                                Toast.makeText(context, "Action", Toast.LENGTH_LONG).show();
                            }
                        }), 
                        "Action")), 
            content))).show();