Bottom Dialogs

An Android Library that shows on the bottom of the screen a fully customisable dialog.

License

License

GroupId

GroupId

com.zeoflow
ArtifactId

ArtifactId

bottom-dialogs
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

aar
Description

Description

Bottom Dialogs
An Android Library that shows on the bottom of the screen a fully customisable dialog.
Project URL

Project URL

https://github.com/zeoflow/bottom-dialogs
Source Code Management

Source Code Management

https://github.com/zeoflow/bottom-dialogs

Download bottom-dialogs

How to add to project

<!-- https://jarcasting.com/artifacts/com.zeoflow/bottom-dialogs/ -->
<dependency>
    <groupId>com.zeoflow</groupId>
    <artifactId>bottom-dialogs</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.zeoflow/bottom-dialogs/
implementation 'com.zeoflow:bottom-dialogs:1.0.0'
// https://jarcasting.com/artifacts/com.zeoflow/bottom-dialogs/
implementation ("com.zeoflow:bottom-dialogs:1.0.0")
'com.zeoflow:bottom-dialogs:aar:1.0.0'
<dependency org="com.zeoflow" name="bottom-dialogs" rev="1.0.0">
  <artifact name="bottom-dialogs" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.zeoflow', module='bottom-dialogs', version='1.0.0')
)
libraryDependencies += "com.zeoflow" % "bottom-dialogs" % "1.0.0"
[com.zeoflow/bottom-dialogs "1.0.0"]

Dependencies

compile (8)

Group / Artifact Type Version
androidx.appcompat » appcompat jar 1.2.0
androidx.browser » browser jar 1.2.0
androidx.cardview » cardview jar 1.0.0
androidx.constraintlayout » constraintlayout jar 1.1.3
androidx.exifinterface » exifinterface jar 1.3.0-alpha01
androidx.recyclerview » recyclerview jar 1.1.0
androidx.transition » transition jar 1.4.0-beta01
com.zeoflow : material-elements jar 1.2.1

Project Modules

There are no modules declared in this project.

Bottom Dialogs for Android

Intro

An Android Library that shows on the bottom of the screen a fully customisable dialog.

Getting Started

For information on how to get started with Password Strength, take a look at our Getting Started guide.

Submitting Bugs or Feature Requests

Bugs or feature requests should be submitted at our GitHub Issues section.

How does it work?

1. Depend on our library

Bottom Dialogs for Android is available through Google's Maven Repository. To use it:

  1. Open the build.gradle file for your application.

  2. Make sure that the repositories section includes Google's Maven Repository google(). For example:

      allprojects {
        repositories {
          google()
          jcenter()
        }
      }
  3. Add the library to the dependencies section:

      dependencies {
        // ...
        implementation 'com.zeoflow:bottom-dialogs:<version>'
        // ...
      }

2. Activity/Fragment Class

MainActivity.java

Usage

Basic Bottom Dialog

A basic bottom dialog will be shown. You have access to methods such as setTitle(), setContent(), setIcon(), setCancelable(), dismiss(), etc. Customizations are explained below.

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..
        new BottomDialog.Builder(this)
            .setTitle("Awesome!")
            .setContent("What can we improve? Your feedback is always welcome.")
            .show();
        //..
    }
    //..
}

Displaying an icon

The bottom dialog icon will be shown to the left of the title.

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..
        new BottomDialog.Builder(this)
            .setTitle("Awesome!")
            .setContent("What can we improve? Your feedback is always welcome.")
            .setIcon(R.drawable.ic_launcher)
            //.setIcon(ContextCompat.getDrawable(this, R.drawable.ic_launcher))
            .show();
        //..
    }
    //..
}

Adding buttons and callbacks

Buttons are showed at the end of the bottom dialog. You can add your own text, colors and actions/callbacks.

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..
        new BottomDialog.Builder(this)
            .setTitle("Awesome!")
            .setContent("What can we improve? Your feedback is always welcome.")
            .setPositiveText("OK")
            .setPositiveBackgroundColorResource(R.color.colorPrimary)
            //.setPositiveBackgroundColor(ContextCompat.getColor(this, R.color.colorPrimary)
            .setPositiveTextColorResource(android.R.color.white)
            //.setPositiveTextColor(ContextCompat.getColor(this, android.R.color.colorPrimary)
            .onPositive(new BottomDialog.ButtonCallback() {
                @Override
                public void onClick(BottomDialog dialog) {
                    Log.d("BottomDialogs", "Do something!");
                }
            }).show();
        //..
    }
    //..
}

Adding a custom view

You can add custom view to your bottom dialog just by adding the layout to the setCustomView() method.

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..
        new BottomDialog.Builder(this)
            .setTitle("Awesome!")
            .setContent("What can we improve? Your feedback is always welcome.")
            .setCustomView(R.layout.my_custom_view)
            .show();
        //..
    }
    //..
}

License

Copyright 2020 ZeoFlow

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.

๐Ÿ† Contributors ๐Ÿ†

com.zeoflow

ZeoFlow

From ZeoFlow with โค๏ธ to Developers

Versions

Version
1.0.0