• Stars
    star
    162
  • Rank 232,284 (Top 5 %)
  • Language
    Java
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📱Android Library to implement beautiful dialogs in android apps easily

Flat-Dialog

platform License gitmoji-changelog

Installation

Add this in your root build.gradle file (not your module build.gradle file):

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

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	...
	implementation 'com.github.mejdi14:Flat-Dialog-Android:1.0.5'
}

Screenshots

How to use with java

 final FlatDialog flatDialog = new FlatDialog(ExempleActivity.this);
        flatDialog.setTitle("Login")
                .setSubtitle("write your profile info here")
                .setFirstTextFieldHint("email")
                .setSecondTextFieldHint("password")
                .setFirstButtonText("CONNECT")
                .setSecondButtonText("CANCEL")
                .withFirstButtonListner(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        Toast.makeText(ExempleActivity.this, flatDialog.getFirstTextField(), Toast.LENGTH_SHORT).show();
                    }
                })
                .withSecondButtonListner(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        flatDialog.dismiss();
                    }
                })
                .show();

How to use with kotlin

   val flatDialog = FlatDialog(this@MainActivity)
        flatDialog.setTitle("Login")
            .setSubtitle("write your profile info here")
            .setFirstTextFieldHint("email")
            .setSecondTextFieldHint("password")
            .setFirstButtonText("CONNECT")
            .setSecondButtonText("CANCEL")
            .withFirstButtonListner {
                 // do something ...
                }
            .withSecondButtonListner {
                    flatDialog.dismiss()
            }
            .show()

More useful methods

Method Description
isCancelable(boolean) Define if you want to close dialog when you click outside
setIcon(image) Add an image at the top of the dialog
setBackgroundColor(color) Change the dialog background color
setFirstTextFieldHint(String) Set a hint for the edittext
setFirstTextFieldTextColor(color) Set the edittext text color
setFirstTextFieldBorderColor(color) Set the border color for the edittext
setFirstTextFieldInputType(type) Set the input type for the edittext
setFirstButtonColor(color) Set the button background color

Contributing

Any contributions, large or small, major features, bug fixes, are welcomed and appreciated

More Repositories

1

BooksSwipe

🌻 Android ViewPager2 with animations
Kotlin
61
star
2

mutli-day-calculator

android component design made with Jetpack Compose and Canvas
Kotlin
29
star
3

ProfileDesign

📱Android Profile Design with Epoxy
Java
21
star
4

flutter_multi_search

https://pub.dev/packages/multi_search_flutter
Dart
20
star
5

AndroidColorPicker

🔥 Android lightweight, animated and easy to use ColorPicker
Kotlin
13
star
6

music-app-design

Java
12
star
7

flutter-foldable-menu

https://pub.dev/packages/flutter_foldable_menu
Dart
9
star
8

ARGreenForest

create your own forest with android ARcore
Java
8
star
9

Card-Switcher

JetPack Compose animation for switching cards
Kotlin
8
star
10

spacex-android-client

spacex android app with Apollo GraphQl
Kotlin
7
star
11

NestJs-Official-Course-Coffee-App

TypeScript
4
star
12

AndroidFeedBack

Android feedback design
Java
3
star
13

JetPack-Searchable-Drowpdown

Kotlin
2
star
14

flutter_stepper

this is a new package for flutter canvas stepper
Dart
2
star
15

nest-chat-app

TypeScript
1
star
16

Android-Interctive-Login

Kotlin
1
star
17

Lean-Dialog

Kotlin
1
star
18

Stanley-Kubrick-Archive

Kotlin
1
star
19

fluppy-bird-flutter

Dart
1
star
20

Android-Weather-Widget

Kotlin
1
star
21

Android-AI-Tic-Tac-Toe

Kotlin
1
star
22

AndroidNavigationComponent

in progress
Java
1
star
23

Android-Canvas-PlayGround

Kotlin
1
star
24

My-Robot

JavaScript
1
star
25

flutter_understanding_dart

30 days of flutter event
Dart
1
star
26

mejdi14

1
star
27

Card-Paginator

Dart
1
star
28

flutter-chat-app-with-socket-io

Dart
1
star
29

Android-Biometric-Authentification

testing the new biometric authentification api
Kotlin
1
star
30

mejdi

Vue
1
star
31

Jetbrains-Official-Kotlin-Training

HTML
1
star
32

flutter_block_pattern

30 days of flutter event
Dart
1
star
33

flutter_clean_architecture

this project is for 30 days of flutter event
Dart
1
star
34

socket-io-server-node

JavaScript
1
star
35

menu-animations

Dart
1
star
36

hello-github-actions

Dockerfile
1
star
37

ParisSportifDemo

Kotlin
1
star
38

flutter-practice-day-1

Dart
1
star
39

Composable-Fab-Buttons-Multiplatform

Kotlin
1
star
40

DaggerTesting

Java
1
star