A Material Dialog Builder for Jetpack Compose

Overview

Compose Material Dialogs

πŸš€ Easy to use library to help you build complex dialogs using Jetpack Compose πŸš€

Codacy BadgeBuild & Test

Current Library Compose Version: 1.1.1

See Releases and Changelog

Core

Core Documentation

Maven Central

dependencies {
  ...
  implementation "io.github.vanpra.compose-material-dialogs:core:0.7.0" 
  ...
}

Date and Time Picker

Date and Time Picker Documentation

Maven Central

dependencies {
  ...
  implementation "io.github.vanpra.compose-material-dialogs:datetime:0.7.0"
  ...
}

Color Picker

Color Picker Documentation

Maven Central

dependencies {
  ...
  implementation "io.github.vanpra.compose-material-dialogs:color:0.7.0"
  ...
}

For Developers

If you would like to help by contributing to the library have a look at our Contribution Guide to get started

Credits

This library's design is heavily inspired by https://github.com/afollestad/material-dialogs

Comments
  • Navigation buttons not visible for DateTimePicker

    Navigation buttons not visible for DateTimePicker

    The "Cancel", "Next", "OK" buttons aren't visible for me when using the datetimepicker (but are with the datepicker!).

    I have a pretty small screen, so my guess is that they are pushed out of view by the large header at the top. I think it would generally be a good idea to make dialogs scrollable in case the content overflows.

    opened by Namnodorel 11
  • I am getting crash every time with the datepicker

    I am getting crash every time with the datepicker

    No static method AnimatedVisibility(ZLandroidx/compose/ui/Modifier;Landroidx/compose/animation/EnterTransition;Landroidx/compose/animation/ExitTransition;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedVisibilityKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedVisibilityKt' appears in /data/app/com.mirus.orpheuspatientapp.androidApp-uddfwQzqociDqoGlch52bg==/base.apk)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:129)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:117)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:135)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at com.google.accompanist.pager.Pager.Pager-_-WMjBM(Pager.kt:309)
    
    opened by Shashank02051997 10
  • DatePicker crashes on compose=1.1.1

    DatePicker crashes on compose=1.1.1

    Stacktrace: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/foundation/lazy/GridCells$Fixed; at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.DayOfWeekHeader(DatePicker.kt:377) at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.CalendarView(DatePicker.kt:306) at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.access$CalendarView(DatePicker.kt:1) at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:141) at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:118) ...

    The reason is that in 1.1.1 GridCells was moved to .grid subpackage (and btw became stable). ( old: https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/GridCells new: https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/GridCells )

    compose-material-dialogs version: 0.7.0

    UPDATE: Actually I haven't this problem.. I was wrong about 1.1.1 compose version, I used 1.2.0-alpha05.. πŸ™ˆ

    bug 
    opened by evjava 9
  • `MaterialDialog.datepicker` not acessible

    `MaterialDialog.datepicker` not acessible

    With version 0.5.0, MaterialDialog.datepicker is no longer available. I tried the following imports:

    import com.vanpra.composematerialdialogs.datetime.date.datepicker
    

    as well as

    import com.vanpra.composematerialdialogs.datetime.datepicker.datepicker
    

    and

    import com.vanpra.composematerialdialogs.datetime.date.*
    

    am I missing something? πŸ€”

    When I downgrade to 0.4.2, the import

    import com.vanpra.composematerialdialogs.datetime.datepicker.datepicker
    

    works.

    opened by strangesource 8
  • Crash when display datepicker

    Crash when display datepicker

    Describe the bug App crashes when trying to display datepicker

    To Reproduce

        val dialogState = rememberMaterialDialogState()
        MaterialDialog(
            dialogState = dialogState,
            buttons = {
                positiveButton(stringResource(android.R.string.ok))
                negativeButton(stringResource(android.R.string.cancel))
            }
        ) {
            datepicker ()
        }
    
    // called from other place
    dialogState.show()
    

    Please complete the following information about your device:

    • Mi10T
    • Android 11
    • kotlin_version = '1.6.10'
    • compose_version = '1.2.0-alpha04'
    • ktx_version = '2.4.1'
    • implementation "io.github.vanpra.compose-material-dialogs:core:0.6.3"
    • implementation "io.github.vanpra.compose-material-dialogs:datetime:0.6.3"
    • coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

    Stacktrace

    
        java.lang.NoSuchFieldError: No field $stable of type I in class Landroidx/compose/foundation/lazy/GridCells$Fixed; or its superclasses (declaration of 'androidx.compose.foundation.lazy.GridCells$Fixed' appears in /data/app/~~x9z-5X7MYni1UnazlAHzjA==/com.feivur.compose-XWcg5z53WPIMpzZF6WR8Ew==/base.apk)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.DayOfWeekHeader(DatePicker.kt:377)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.CalendarView(DatePicker.kt:306)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt.access$CalendarView(DatePicker.kt:1)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:141)
            at com.vanpra.composematerialdialogs.datetime.date.DatePickerKt$DatePickerImpl$1$1.invoke(DatePicker.kt:118)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:135)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at com.google.accompanist.pager.Pager$Pager$7$1$1.invoke(Pager.kt:326)
            at com.google.accompanist.pager.Pager$Pager$7$1$1.invoke(Pager.kt:315)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:135)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at androidx.compose.foundation.lazy.list.LazyListScopeImpl$items$1$1.invoke(LazyListScopeImpl.kt:45)
            at androidx.compose.foundation.lazy.list.LazyListScopeImpl$items$1$1.invoke(LazyListScopeImpl.kt:45)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
            at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:84)
            at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory$CachedItemContent$content$1.invoke(LazyLayoutItemContentFactory.kt:113)
            at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory$CachedItemContent$content$1.invoke(LazyLayoutItemContentFactory.kt:104)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$2$1$1.invoke(SubcomposeLayout.kt:389)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$2$1$1.invoke(SubcomposeLayout.kt:389)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
            at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
            at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:74)
            at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3035)
            at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3024)
            at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:252)
            at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
            at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3024)
            at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:2974)
            at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:555)
            at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:811)
            at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3546)
            at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3546)
    E/AndroidRuntime:     at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3546)
            at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:502)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:407)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.access$subcomposeInto(SubcomposeLayout.kt:297)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$2.invoke(SubcomposeLayout.kt:382)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$2.invoke(SubcomposeLayout.kt:379)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.withNoObservations(SnapshotStateObserver.kt:142)
            at androidx.compose.ui.node.OwnerSnapshotObserver.withNoSnapshotReadObservation$ui_release(OwnerSnapshotObserver.kt:55)
            at androidx.compose.ui.node.LayoutNode.withNoSnapshotReadObservation$ui_release(LayoutNode.kt:1153)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:379)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:373)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:362)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:647)
            at androidx.compose.foundation.lazy.layout.LazyLayoutPlaceablesProvider.getAndMeasure-0kLqBqw(LazyMeasurePolicy.kt:58)
            at androidx.compose.foundation.lazy.list.LazyMeasuredItemProvider.getAndMeasure-oA9-DU0(LazyMeasuredItemProvider.kt:45)
            at androidx.compose.foundation.lazy.list.LazyListMeasureKt.measureLazyList-wroFCeY(LazyListMeasure.kt:148)
            at androidx.compose.foundation.lazy.list.LazyListKt$rememberLazyListMeasurePolicy$1$1.measure-3p2s80s(LazyList.kt:270)
            at androidx.compose.foundation.lazy.layout.LazyLayoutKt$LazyLayout$2$1.invoke-0kLqBqw(LazyLayout.kt:68)
            at androidx.compose.foundation.lazy.layout.LazyLayoutKt$LazyLayout$2$1.invoke(LazyLayout.kt:61)
            at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(SubcomposeLayout.kt:514)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:306)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.foundation.layout.SizeModifier.measure-3p2s80s(Size.kt:781)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasurePolicy$1.measure-3p2s80s(RowColumnImpl.kt:89)
    E/AndroidRuntime:     at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.foundation.layout.FillModifier.measure-3p2s80s(Size.kt:658)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasurePolicy$1.measure-3p2s80s(RowColumnImpl.kt:89)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at com.vanpra.composematerialdialogs.MaterialDialogKt$MaterialDialog$3$2$1$2.measure-3p2s80s(MaterialDialog.kt:286)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1.measure-3p2s80s(Box.kt:113)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:306)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.ui.graphics.BlockGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:247)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.foundation.layout.WrapContentModifier.measure-3p2s80s(Size.kt:878)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:306)
    E/AndroidRuntime:     at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.foundation.layout.PaddingModifier.measure-3p2s80s(Padding.kt:364)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.foundation.layout.SizeModifier.measure-3p2s80s(Size.kt:781)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.foundation.layout.FillModifier.measure-3p2s80s(Size.kt:658)
            at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:40)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at androidx.compose.ui.window.AndroidDialog_androidKt$DialogLayout$1.measure-3p2s80s(AndroidDialog.android.kt:404)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:75)
            at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1280)
            at androidx.compose.ui.layout.RootMeasurePolicy.measure-3p2s80s(RootMeasurePolicy.kt:38)
            at androidx.compose.ui.node.InnerPlaceable.measure-BRTryo0(InnerPlaceable.kt:54)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.measure-BRTryo0(DelegatingLayoutNodeWrapper.kt:96)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:99)
            at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1918)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:76)
    E/AndroidRuntime:     at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:98)
            at androidx.compose.ui.node.LayoutNode.remeasure-_Sx5XlM$ui_release(LayoutNode.kt:1289)
            at androidx.compose.ui.node.MeasureAndLayoutDelegate.doRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:168)
            at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:246)
            at androidx.compose.ui.node.MeasureAndLayoutDelegate.access$remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:38)
            at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:191)
            at androidx.compose.ui.platform.AndroidComposeView.onMeasure(AndroidComposeView.android.kt:739)
            at android.view.View.measure(View.java:25968)
            at androidx.compose.ui.platform.AbstractComposeView.internalOnMeasure$ui_release(ComposeView.android.kt:302)
            at androidx.compose.ui.window.DialogLayout.internalOnMeasure$ui_release(AndroidDialog.android.kt:217)
            at androidx.compose.ui.platform.AbstractComposeView.onMeasure(ComposeView.android.kt:289)
            at android.view.View.measure(View.java:25968)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7049)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at android.view.View.measure(View.java:25968)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7049)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at android.view.View.measure(View.java:25968)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7049)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at com.android.internal.policy.DecorView.onMeasure(DecorView.java:767)
            at android.view.View.measure(View.java:25968)
            at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3552)
            at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2330)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2619)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2080)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8515)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1076)
            at android.view.Choreographer.doCallbacks(Choreographer.java:897)
            at android.view.Choreographer.doFrame(Choreographer.java:826)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1061)
            at android.os.Handler.handleCallback(Handler.java:938)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:236)
            at android.app.ActivityThread.main(ActivityThread.java:8056)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
    I/Process: Sending signal. PID: 12085 SIG: 9
    
    bug 
    opened by feivur 7
  • Disabling specific days in date picker

    Disabling specific days in date picker

    I needed the way to disallow and disable some dates from selection. So now you can do for example:

    datepicker(allowedDateValidator = {
                it.dayOfWeek !== DayOfWeek.SATURDAY && it.dayOfWeek !== DayOfWeek.SUNDAY
            }) 
    
    opened by wojta 7
  • Problem with datepicker layout

    Problem with datepicker layout

    I have a problem with datepicker in 0.5.1. When flipping pages, if the current or neighboring month has 6 weeks, horisontalpager takes an additional height, and this violates the layout. The confirmation buttons go off the screen.

    And an additional wish. I would be grateful if you can pass the names of the days of the weeks as parameter. This is important for localization.

    opened by v105568 7
  • java.lang.NoSuchMethodError: No static method Text-6FffQQw

    java.lang.NoSuchMethodError: No static method Text-6FffQQw

    I get the below error after updating the compose version.

    java.lang.NoSuchMethodError: No static method Text-6FffQQw(Ljava/lang/String;Landroidx/compose/ui/Modifier;JJLandroidx/compose/ui/text/font/FontStyle;Landroidx/compose/ui/text/font/FontWeight;Landroidx/compose/ui/text/font/FontFamily;JLandroidx/compose/ui/text/style/TextDecoration;Landroidx/compose/ui/text/style/TextAlign;JLandroidx/compose/ui/text/style/TextOverflow;ZILkotlin/jvm/functions/Function1;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V in class Landroidx/compose/material/TextKt; or its super classes (declaration of 'androidx.compose.material.TextKt' appears in /data/app/com.example-Y03XriHO9sVbz_0gjKYDeA==/base.apk)

    Verisons & dependencies used for this lib: kotlin_version = '1.5.10' compose_version = '1.0.0-beta08' implementation("io.github.vanpra.compose-material-dialogs:datetime:0.4.2") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")

    Before updating the kotlin and compose versions, it used to work fine. Please let me know if I'm doing anything wrong here.

    opened by smallworldpc 7
  • MaterialDialog: Adjust default styling and add more customization

    MaterialDialog: Adjust default styling and add more customization

    I know this is different from the library reference styling, but I personally think this is a good addition since in my use case it makes it possible to get uniform styling with other dialogs created without this library.

    I'm open to discussion for the implementation if it doesn't up to your liking.

    opened by ivaniskandar 7
  • Update compose to the latest version

    Update compose to the latest version

    With the new version of the Jetpack compose Alpha 11. There is a crash while opening the Dialog.

    java.lang.NoSuchMethodError: No static method rememberMeasureBlocks(Landroidx/compose/ui/Alignment;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/node/MeasureBlocks; in class Landroidx/compose/foundation/layout/BoxKt; or its super classes (declaration of 'androidx.compose.foundation.layout.BoxKt' appears in /data/app/com.sap.ariba.mint-WOSP5E9h7725q-wmcj6Qhw==/base.apk)

    opened by deepakgahlot98 7
  • Upgrade: Compose 1.1.0-beta04, Kotlin 1.6.0

    Upgrade: Compose 1.1.0-beta04, Kotlin 1.6.0

    Closes #120 Will need to change the 0.6.2-SNAPSHOT to 0.6.2 or greater. I did snapshot to allow publishToMavenLocal to work in my setup without requiring signing. There is also some minor cleanup in portions of the build.gradle.kts stuff. So far only datepicker tested.

    opened by skolson 6
  • [WIP] Update library to material 3

    [WIP] Update library to material 3

    Description

    Please include a summary of the change and reference any bug or feature request this will close.

    Type of change

    Please delete options that are not relevant.

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Documentation update/fix

    Checklist

    • [ ] My code follows the style guidelines of this project
    • [ ] I have performed a self-review of my own code
    • [ ] I have made corresponding changes to the documentation
    • [ ] My changes generate no new warnings
    • [ ] I have added tests that prove my fix is effective or that my feature works
    • [ ] New and existing unit and screenshot tests pass locally with my changes
    opened by vanpra 0
  • Stop using MaterialTheme in the library's code

    Stop using MaterialTheme in the library's code

    Describe the bug Stop using MaterialTheme because that leads to hardcoded material theme values throughout the library. I discovered this issue while trying to override all colors and shapes of the dialogs for Material3 migration. I discovered that many usages of MaterialTheme (from material2) are found inside the library's internal code.

    To Reproduce

    1. Use Material3 and remove material2 AppTheme() from the composition
    2. Watch your dialogs get broken without a way to override all colors. Example of hardcoded properties: Shapes and ":" text color and style of the Time Picker dialog.

    Expected behaviour When I provide the picker with colors, they must be actually used, not just for the sake of it.

    Screenshots Untitled

    bug 
    opened by Nek-12 0
  • DatePicker Buttons Cannot be Lower Case

    DatePicker Buttons Cannot be Lower Case

    All of the methods for creating MaterialDialogButtons have this line causing the button's text to be all uppercase, which I do not want. val buttonText = getString(res, text).uppercase(Locale.ROOT) My designs call for only the first letter to be capitalized.

    bug 
    opened by KyleBorth-Gravie 0
  • Timepicker clipping with large system font sizes

    Timepicker clipping with large system font sizes

    Describe the bug When Large font sizes selected in the system settings Hour/Minute labels become clipped in timepicker. Large font size on emulator (Pixel 5 API 31) is not enough to cause the problem, but on Samsung phone (Android 10) you can choose larger font size, which causes clipping. Buttons are clipped as well.

    To Reproduce Steps to reproduce the behaviour (including any applicable code):

    1. Go to Android Settings -> Display -> Font size and style
    2. Select largest font
    3. Open timepicker dialog in demo app
    4. See error

    Expected behaviour Text Should not clip

    Screenshots Screenshot_20221011-112435_compose-material-dialogs

    Device:

    • Name: Samsung Galaxy A21
    • Android Version: Android 10

    Suggestion May be it is possible to just set text size of H/M/: labels in Dp instead - field is large enough that it is bigger than the biggest font size selectable, so should not be a problem from accessibility point of view. 60-65.dp seem to work well (at least on non-small devices) For Buttons - the opposite - set defaultButtonHeight in MaterialDialogScope.DialogButtonsLayout to 36.sp rather than 36.dp.

    bug 
    opened by Jahor 0
  • Fix wrong material color for period. Now it is visible in M3 or custo…

    Fix wrong material color for period. Now it is visible in M3 or custo…

    …m colors implementation

    Description

    Please include a summary of the change and reference any bug or feature request this will close.

    Type of change

    Please delete options that are not relevant.

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Documentation update/fix

    Checklist

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [ ] I have made corresponding changes to the documentation
    • [ ] My changes generate no new warnings
    • [ ] I have added tests that prove my fix is effective or that my feature works
    • [ ] New and existing unit and screenshot tests pass locally with my changes
    opened by yogaboyCZ 0
Releases(0.8.1-rc)
  • 0.8.1-rc(Jul 10, 2022)

    • Update compose to 1.2.0-rc03 (#156)
    • Update kotlin to 1.7.0
    • Remove material-icons-extended dependency (#153)
    • Add parameter for changing title and message style and color (#150)
    Source code(tar.gz)
    Source code(zip)
  • 0.7.1(May 16, 2022)

    • Internationalise start day of week in date picker (https://github.com/vanpra/compose-material-dialogs/issues/146 and https://github.com/vanpra/compose-material-dialogs/issues/54)
    • Add modifier parameter to input component (https://github.com/vanpra/compose-material-dialogs/issues/141)
    • Add state parameter to the list component (https://github.com/vanpra/compose-material-dialogs/issues/140)
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Mar 9, 2022)

    • Update compose to 1.1.1
    • [BREAKING CHANGE] Modify arguments of the input component to better match those of TextField
    • Add textFieldStyle parameter to input component to allow for outlined text field style (#92)
    • Add text color options for month and day of week header text of date picker (#124)
    • Add ability to change time picker title color (#123)
    • Fix bug which causes input field to lose focus on validity change (#132)
    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(Jan 21, 2022)

  • 0.6.2(Dec 21, 2021)

  • 0.6.1(Oct 7, 2021)

  • 0.6.0(Sep 10, 2021)

    • [BREAKING CHANGE] Replace MaterialDialog class structure with composable function with state. See docs and the sample app for examples
    • Update compose to 1.1.0-alpha03
    • Update kotlin to 1.5.30
    • Fix bug which caused the year picker to fill the whole dialog
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jul 30, 2021)

  • 0.5.0(Jul 27, 2021)

    • Update compose to 1.0.0-beta09
    • Modify dialog build function to take buttons as a parameter
    • Fix font sizes in time picker and color picker (#75)
    • Make time picker and date picker adapt to smaller screen sizes (#81)
    • Fix horizontal padding on dialog for smaller screen sizes (#93)
    Source code(tar.gz)
    Source code(zip)
Owner
Pranav Maganti
3rd Year Joint Maths and Computing student at Imperial College London
Pranav Maganti
Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

# Media Recorder Dialog ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/badge/Android-CustomView-blue.sv

Abdullah Alhazmy 73 Nov 29, 2022
ionalert 1.3 1.6 Java Sweetalert, Dialog, Alert Dialog

ionalert - Android Alert Dialog A beautiful design Android Alert Dialog, alternative of Sweet Alert Dialog based on KAlertDialog using MaterialCompone

Excel Dwi Oktavianto 23 Sep 17, 2022
Alert Dialog - You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment.

We show a warning message (Alert Dialog) to the user in many parts of our applications. You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment. Thanks to this extension, you can create a Dialog and call it in the Activity or Fragment you want and customize the component you want.

GΓΆkmen Bayram 0 Jan 9, 2022
[Deprecated] This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.

Deprecated Please use android.support.v7.app.AlertDialog of support-v7. AlertDialogPro Why AlertDialogPro? Theming Android's AlertDialog is not an eas

Feng Dai 468 Nov 10, 2022
AlertDialog for Android, a beautiful and material alert dialog to use in your android app.

AlertDialog for Android, a beautiful and material alert dialog to use in your android app. Older verion of this library has been removed

Akshay Masram 124 Dec 28, 2022
CuteDialog- Android Custom Material Dialog Library

A Custom Material Design Dialog Library for Android Purpose CuteDialog is a Highly Customizable Material Design Android Library. CuteDialog allows dev

CuteLibs - Smart & Beautiful Android Libraries 7 Dec 7, 2022
Awesome Dialog built with Jetpack Compose

Compose Awesome Dialog Library untuk Android Native yang menggunakan Jetpack Compose untuk toolkit UI nya. Compose Awesome Dialog ini menampilkan Dial

Farhan Roy 16 Nov 4, 2022
Advanced dialog solution for android

DialogPlus Simple and advanced dialog solution. Uses normal view as dialog Provides expandable option Multiple positioning Built-in options for easy i

Orhan Obut 5k Dec 29, 2022
SweetAlert for Android, a beautiful and clever alert dialog

Sweet Alert Dialog SweetAlert for Android, a beautiful and clever alert dialog δΈ­ζ–‡η‰ˆ Inspired by JavaScript SweetAlert Demo Download ScreenShot Setup Th

书呆子 7.3k Dec 30, 2022
An Android Dialog Lib simplify customization.

FlycoDialog-Master δΈ­ζ–‡η‰ˆ An Android Dialog Lib simplify customization. Supprot 2.2+. Features [Built-in Dialog, convenient to use](#Built-in Dialog) [Ab

Flyco 2.3k Dec 8, 2022
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

Keisuke Kobayashi 553 Nov 23, 2022
A simple file/ directory picker dialog for android

FileListerDialog FileListerDialog helps you to list and pick file/directory. Library is built for Android Getting Started Installing To use this libra

Yogesh S 446 Jan 7, 2023
a quick custom android dialog project

QustomDialog Qustom helps you make quick custom dialogs for Android. All this is, for the time being, is a way to make it easy to achieve the Holo loo

Daniel Smith 183 Nov 20, 2022
Android library that allows applications to add dialog-based slider widgets to their settings

Android Slider Preference Library Overview Slider represents a float between 0.0 and 1.0 Access with SliderPreference.getValue() or SharedPreferences.

Jay Petacat 135 Nov 29, 2022
An Android library for displaying a dialog where it presents new features in the app.

WhatIsNewDialog What is new dialog for Android is used for presenting new features in the the app. It can be used in the activity starts, from menu or

NonZeroApps 22 Aug 23, 2022
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

Keisuke Kobayashi 553 Nov 23, 2022
An easy to use, yet very customizable search dialog

search-dialog An awesome and customizable search dialog with built-in search options. Usage First add jitpack to your projects build.gradle file allpr

Mad Mirrajabi 518 Dec 15, 2022
Common dialog fragments

Common dialog fragments

null 6 Aug 29, 2022
Custom Dialog

Custom Dialog use Lottie Dialog How To Use? If yow want specific lottie file you must put your assets to under app β†’ src β†’ main β†’ assets folder Add li

DevHoony 16 Oct 10, 2022