Material-dialogs: Support for AndroidX

Created on 28 May 2018  路  10Comments  路  Source: afollestad/material-dialogs

([x] becomes a filled in checkbox, [ ] is an empty one)

  • [x] I understand that dialogs which require a combination of different dialog types provided by this library (e.g. list + progress, input + checkbox) require a custom view.
  • [x] I have verified there are no duplicate active or recent bugs, questions, or requests
  • [x] I have verified that I am using the latest version of Material Dialogs.
  • [x] I have given my issue a non-generic title.
  • [x] I have read over the documentation (before asking questions on how to do something).

Include the following:
  • Material Dialogs version: 0.9.6.0

What about support for the androidx-packages (e.g. androidx.recyclerview.widget.RecyclerView to be used for MaterialDialog.customAdapter()).

Is there support planned? Or is this entire lib going to be discontinued because material-components are going to include nice dialogs (any news on this as well?)?


Currently, I think its working providing a android.support.v7.widget.RecyclerView but I'm not sure where this dependency comes from (I've tried to only depend on the new androidx-ones).


https://android-developers.googleblog.com/2018/05/hello-world-androidx.html
https://developer.android.com/topic/libraries/support-library/refactor

Most helpful comment

Sure it will eventually be compatible, but AndroidX is still on Alpha 1, even Glide is incompatible for now, and it is considered a bad practice to release something on a non stable API, so there is still a long way to go. You can use Support 28 until it gets stable, since it has the same changes as AndroidX.

As for the new dialogs, I wouldn't count on them. I didn't check the new implementation, but they are usually very very basic and do not provide 5% of the functionality from this library.

All 10 comments

Everything becomes AndroidX, even Fragments and Activities. When this change is made, there is no going back.

That's fine - but material-dialogs needs to be compatible. Or, maybe this lib gets deprecated because MDC comes (finally) with a good dialog-api.

Currently, I cannot use either of them - therefor this issue.

Sure it will eventually be compatible, but AndroidX is still on Alpha 1, even Glide is incompatible for now, and it is considered a bad practice to release something on a non stable API, so there is still a long way to go. You can use Support 28 until it gets stable, since it has the same changes as AndroidX.

As for the new dialogs, I wouldn't count on them. I didn't check the new implementation, but they are usually very very basic and do not provide 5% of the functionality from this library.

Version 2.0.0 of Material Dialogs is now available in alpha, but yeah, androidx is not in a production state so I will not be pulling it in yet.

from AndroidX Docs

1.0.0-rc02
(August 27, 2018)
This release candidate of AndroidX is considered feature-complete and its public API surface is stable. This release will be shipped as final stable version barring any critical issues that may arise. This release should be safe to use in production.

You still need Gradle flags and such for it to work.

Icant get this work on androidx

@xperiafan13-rom that's because it has not been updated for AndroidX.

Note that this library works fine with AndroidX. I do have this setup running without problems. Just make sure that the Jetifier and AndroidX flags have been configured correctly as defined here: https://developer.android.com/topic/libraries/support-library/androidx-overview

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imcloud picture imcloud  路  5Comments

bernaferrari picture bernaferrari  路  5Comments

dabo248 picture dabo248  路  7Comments

pixelbendr picture pixelbendr  路  5Comments

azizimusa picture azizimusa  路  4Comments