All Projects → marcoscgdev → HeaderDialog

marcoscgdev / HeaderDialog

Licence: MIT license
An android library to display a material-designed dialog with header.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to HeaderDialog

Dialogsheet
An Android library to create fully material designed bottom dialogs similar to the Android Pay app.
Stars: ✭ 236 (+268.75%)
Mutual labels:  dialog, materialdesign
Color-O-Matic
Beautiful color picker dialog for Android 9+
Stars: ✭ 43 (-32.81%)
Mutual labels:  dialog
vaadin-dialog
High quality web component for modal dialogs. Part of the Vaadin platform.
Stars: ✭ 15 (-76.56%)
Mutual labels:  dialog
angular-custom-modal
Angular2+ Modal / Dialog (with inner component support).
Stars: ✭ 30 (-53.12%)
Mutual labels:  dialog
probabilistic nlg
Tensorflow Implementation of Stochastic Wasserstein Autoencoder for Probabilistic Sentence Generation (NAACL 2019).
Stars: ✭ 28 (-56.25%)
Mutual labels:  dialog
FancyDialog
Kotlin + DSL风格代替传统的Builder模式 诸多可配置项 高阶函数代替自定义回调接口 书写起来超级顺手
Stars: ✭ 24 (-62.5%)
Mutual labels:  dialog
eins-modal
Simple to use modal / alert / dialog / popup. Created with pure JS. No javascript knowledge required! Works on every browser and device! IE9
Stars: ✭ 30 (-53.12%)
Mutual labels:  dialog
Adversarial-Learning-for-Generative-Conversational-Agents
This repository contains a new adversarial training method for Generative Conversational Agents
Stars: ✭ 71 (+10.94%)
Mutual labels:  dialog
silly-android
Android plugins for Java, making core Android APIs easy to use
Stars: ✭ 40 (-37.5%)
Mutual labels:  dialog
babi tools
Augmentation scripts for the bAbI Dialog Tasks dataset
Stars: ✭ 14 (-78.12%)
Mutual labels:  dialog
react-redux-modal-flex
[DEPRECATED] Make easy a modal/popup with Redux
Stars: ✭ 14 (-78.12%)
Mutual labels:  dialog
android-suspend-dialogs
A helper library for Android to display Dialogs by suspending the coroutine till finish of the dialog.
Stars: ✭ 32 (-50%)
Mutual labels:  dialog
CircularDialogs
Its a library for the creating simple success and warning dialogs for android
Stars: ✭ 34 (-46.87%)
Mutual labels:  dialog
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (-67.19%)
Mutual labels:  dialog
dialogbot
dialogbot, provide search-based dialogue, task-based dialogue and generative dialogue model. 对话机器人,基于问答型对话、任务型对话、聊天型对话等模型实现,支持网络检索问答,领域知识问答,任务引导问答,闲聊问答,开箱即用。
Stars: ✭ 96 (+50%)
Mutual labels:  dialog
Toaster-Library
🎫 Android library, Custom toast and dialog (2018)
Stars: ✭ 14 (-78.12%)
Mutual labels:  dialog
blurdialog
A dialog providing a blur effect as background, a title and an icon
Stars: ✭ 72 (+12.5%)
Mutual labels:  dialog
flickabledialog
This dialog can flick and make it easy to dismiss sensuously.
Stars: ✭ 84 (+31.25%)
Mutual labels:  dialog
cookie-consent-js
A simple dialog and framework to handle the German and EU law about cookies in a website (December 2021)
Stars: ✭ 55 (-14.06%)
Mutual labels:  dialog
Android-Dialog
Android Dialog(BaseDialog、AlertDialog、ProgressDialog、SuccessDdialog、ErrorDialog、BottomDialog)
Stars: ✭ 36 (-43.75%)
Mutual labels:  dialog

HeaderDialog  API Android Arsenal

An android library to display a material-designed dialog with header.


Releases:

Current release: 1.0.6.

You can see all the library releases here.


Screenshots

Get it on Google Play


Features

  • Roboto font
  • LinkMovementMethod support
  • Justify text option
  • Icon, text and both as header
  • Custom header background color
  • Custom header text color
  • Custom header icon color
  • Custom header text gravity
  • Custom message text gravity
  • Show or hide header shadow
  • Multiline header title text option
  • Arabic text support
  • Custom view support (NEW)

Usage:

Adding the depencency

Add this to your root build.gradle file:

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

Now add the dependency to your app build.gradle file:

implementation 'com.github.marcoscgdev:HeaderDialog:1.0.6'

Creating the dialog

Here is a complete snippet of it usage:

new HeaderDialog(this)
    .setColor(getResources().getColor(R.color.colorAccent)) // Sets the header background color
    .setElevation(false) // Sets the header elevation, true by default
    .setIcon(getResources().getDrawable(R.drawable.ic_info_outline_black_48dp)) // Sets the dialog icon image
    .setTitle(getResources().getString(R.string.library_name)) // Sets the dialog title
    .setMessage("Lorem ipsum dolor sit amet...") // Sets the dialog message
    .justifyContent(true) // Justifies the message text, false by default
    .setTitleColor(Color.parseColor("#212121")) // Sets the header title text color
    .setIconColor(Color.parseColor("#212121")) // Sets the header icon color
    .setTitleGravity(Gravity.CENTER_HORIZONTAL) // Sets the header title text gravity
    .setMessageGravity(Gravity.CENTER_HORIZONTAL) // Sets the message text gravity
    .setTitleMultiline(false) // Multiline header title text option, true by default
    .setView(R.layout.custom); // Set custom view to the dialog (only possible via layout resource)
    .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
	    // Your action
        }
    })
    .setNegativeButton("Close", null)
    .show();

Important note: Do not enable the justified text if you are using html content!

Accessing inflated custom view

HeaderDialog headerDialog = new HeaderDialog(this);
...
headerDialog.show();
headerDialog.getInflatedView().findViewById(R.id.checkbox).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        Toast.makeText(MainActivity.this, "Checkbox clicked!", Toast.LENGTH_SHORT).show();
    }
});

See the sample project to clarify any queries you may have.


License

The MIT License (MIT)

Copyright (c) 2017 Marcos Calvo García

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].