Morphing-Material-Dialogs

Из публичных источников

Анимация перехода Material-диалога :heart: morphing. Библиотека пользовательского интерфейса для Android на Kotlin для создания красивых анимаций преобразования плавающей кнопки действия (floating action button) в Material-диалог.

Машинный перевод · Показать оригинал

Material dialog :heart: morphing animation. An android kotlin UI library for building beautiful animations for converting a floating action button into a material dialog.

ПриложениеКатегория: Мобильные приложенияOpen sourceданные проверены 16 окт. 2026 г.

Обзор

  • android
  • android-app
  • android-application
  • android-sdk
  • android-ui
  • material-design

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Официальный сайтИз публичных источниковиз метаданных каталога
    adi.bio/ ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/Aditya94A/Morphing-Material-Dialogs ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
AndroidНеизвестно———
iOSНеизвестно———

Релизы

проверено 30 окт. 2026 г.
v0.0.4Последний18 мая 2018 г.Официальный источник ↗

Файлы версии 0.0.4

К релизу не приложены файлы.

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 16 окт. 2026 г.
Оценка качества65
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 206
last activity 318 days ago
Документация · 1515
README 8514 chars, description present
Готовность к использованию · 156
install instructions: no; releases: yes
Метаданные · 1010
4/4 of description, homepage, license, topics
Релизы · 106
10 release(s), latest 3072 days ago
Точность категории · 105
classifier confidence 0.5
Популярность · 107
900 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MIT
Сообщество · 55
issues enabled, 64 forks

Лицензия

MIT
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/Aditya94A/Morphing-Material-DialogsОсновной★ 900 звёздактивность 2 дек. 2025 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

KeyPassПохожий
KeyPass: проект с открытым исходным кодом и автономный менеджер паролей. Храните, управляйте и безопасно контролируйте свои данные.MIT · Мобильные приложения
flashdimПохожий
Современное приложение-фонарик с функцией приглушения света на Android 13+Apache-2.0 · Мобильные приложения
MaterialFilesПохожий
MaterialFiles — открытый файловый менеджер для Android 5.0+ в стиле Material Design с поддержкой root, архивов и сетевых хранилищ FTP, SFTP, SMB и WebDAV.GPL-3.0 · Мобильные приложения
KeePassDXПохожий
KeePassDX — бесплатный менеджер паролей и passkey с открытым кодом для Android, который хранит данные в зашифрованном файле формата KeePass.GPL-3.0 · Мобильные приложения
MusifyПохожий
Раскройте полный потенциал музыки: слушайте без усилий в одном приложении!GPL-3.0 · Мобильные приложения
freekioskПохожий
FreeKiosk — приложение с открытым исходным кодом для Android, которое переводит планшет в режим киоска и блокирует его для цифровых вывесок, дашбордов, POS-систем и устройств с одной задачей. Бесплатная альтернатива Fully KioskMIT · Мобильные приложения

README

Из Aditya94A/Morphing-Material-Dialogs · лицензия MIT · загружено 30 окт. 2026 г.

Morphing Material Dialogs

[Release] [Build Status] [GitHub license]

A library for fab-to-dialog morphing (as in Nick Butcher's Plaid) with Aidan Follestad's Material Dialogs.

Table of Contents

  1. Setup Instructions
  2. Usage Instructions
  3. Customization
  4. Misc

Setup Instructions

Add the following to your root (project) level build.gradle:

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

Add the library to your app's build.gradle

	dependencies {
		implementation 'com.github.AdityaAnand1:Morphing-Material-Dialogs:0.0.3'
		//you should also have the design support library, since we're using the native floating action button
   		implementation "com.android.support:design:27.0.2"
	}

In your styles.xml, override the MorphDialog.Base themes (at least one, both if you wish to support light and dark themes for your app)

    <style name="MorphDialog.Custom.Light" parent="MorphDialog.Base.Light">
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
    </style>

    <style name="MorphDialog.Custom.Dark" parent="MorphDialog.Base.Dark">
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
    </style>

In your app's manifest file, add the following (at least one, both if you wish to support light and dark themes for your app)

   <activity
       android:name="com.adityaanand.morphdialog.MorphDialogActivity"
       android:theme="@style/MorphDialog.Custom.Light">
   </activity>
   <activity
       android:name="com.adityaanand.morphdialog.MorphDialogActivityDark"
       android:theme="@style/MorphDialog.Custom.Dark">
   </activity>

Usage instructions

This library mirror's a subset of afollestad/material-dialogs API.

new MorphDialog.Builder(this, fabView)
               .title("Title")
               .content("This is a sentence. Here is another one.") 
               .positiveText(R.string.ok)
               .onPositive((MorphDialog dialog1, MorphDialogAction which) -> {
                   Toast.makeText(this, "onPositive", Toast.LENGTH_SHORT).show();
               })
               .useDarkTheme(true) //optional, default is false
               .show();

For example, if you have a floating action button in your activity

       <android.support.design.widget.FloatingActionButton
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:onClick="morph"/>

Then your morph() might look like:

    public void morph(View view) {
        new MorphDialog.Builder(this, (FloatingActionButton) view)
                .title("Title")
                .content("This is a sentence. Here is another one.")
                .show();
    }

Customization

Listen for action button callbacks

MorphDialog is not a dialog. It's another activity and the only way to get back the result of any interactions with it is through onActivityResult().

In order to use the .onPositive(), .onNegative(), .onNeutral or .onAny() callbacks, you must pass on the activity result to the morphDialog object. You must do this for each dialog that you are using individually.

    MorphDialog dialog1;
    MorphDialog dialog2;
    
    void buildDialog(){
     dialog1 = new MorphDialog.Builder(this, (FloatingActionButton) view)
                .title("Title")
                .content("This is a sentence. Here is another one.")
                .positiveText(R.string.ok)
                .negativeText("Cancel")
                .neutralText("More")
                .onPositive((MorphDialog dialog1, MorphDialogAction which) -> {
                    Toast.makeText(this, "onPositive", Toast.LENGTH_SHORT).show();
                })
                .onNegative((MorphDialog dialog1, MorphDialogAction which) -> {
                    Toast.makeText(this, "onNegative", Toast.LENGTH_SHORT).show();
                })
                .onNeutral((MorphDialog dialog1, MorphDialogAction which) -> {
                    Toast.makeText(this, "onNeutral", Toast.LENGTH_SHORT).show();
                })
                .build();
	}
	
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        dialog1.onActivityResult(requestCode, resultCode, data);
        dialog2.onActivityResult(requestCode, resultCode, data);
    }

If you have a large number of dialogs you may prefer to use the helper function instead, which uses a varargs parameter to register the callback to multiple dialog objects:

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
	MorphDialog.registerOnActivityResult(requestCode, resultCode, data, dialog1, dialog2, dialog3);
    }

Also, note that you will receive the callbacks only after the animation has ended.

Set Canceleable

If you do not want the dialog to close when tapping outside the dialog you can use builder.cancelable(false)

Customize Colors

The following methods can be used to customize the different colors in your dialog

new MorphDialog.Builder(context, (FloatingActionButton) view)
                .contentColor(Color.BLUE)
                .backgroundColor(Color.GREEN)
                .neutralColorRes(R.color.primary)
                .positiveColor(Color.BLACK)
                .titleColor(Color.YELLOW);

Theme overrides

Override the android:windowBackground attribute to provide a custom color for the area outside of the dialog.

    <style name="MorphDialog.Custom.Light" parent="MorphDialog.Base.Light">
        <item name="android:windowBackground">@color/windowBackground</item>
    </style>

Misc

What happens below API 21 (<Lollipop)?

Nothing. Since this library uses activity transitions which are properly supported only for Lollipop and up, the dialog pops up normally without any morphing animation below Lollipop.

Why does the library not support all of Material Dialogs features?

The problem is passing the instructions to build a MaterialDialog (i.e,a MaterialDialog.Builder object) to another activity. The Builder class is not Parcelable and contains a lot of context aware fields like custom views. In the current architecture, there's no clear path to doing this without explicitly adding memory leaks. (Suggestions welcome)

I want to morph from something other than a fab/ I want to morph to something other than MorphDialog

Currently, this library does not support morphing something-other-than-a-fab to something-other-than-a-material-dialog transition. If you'd like for it to work in another setting, say a custom view, head over to the standalone module and check out the minimal implementation (without all the library plumbing) that should point you in the direction of a custom solution.


Fun fact: This library was originally built for Timbre.

Открыть репозиторий ↗