hello everyone i saw this code and i didnt unders...
# android
a
hello everyone i saw this code and i didnt understand how this guy make this it passes the actions and show the view, is it a class with higher order functions or what ? is there a tutorial to learn this kind of code thanks
Copy code
alert("We can't show your position because you generally disabled the location service for your device.") {
        yesButton {
        }
        neutralPressed("Settings") {
            startActivity(Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS))
        }
    }.show()
which is now deprecated. various bits of it have different replacements; if you're interested in the declarative DSL, look into #compose
l
For AlertDialogs, what's into #splitties will probably better suit your use cases: https://github.com/LouisCAD/Splitties/tree/main/modules/alertdialog-material https://github.com/LouisCAD/Splitties/tree/main/modules/alertdialog-appcompat and for coroutines controlled logic: https://github.com/LouisCAD/Splitties/tree/main/modules/alertdialog-appcompat-coroutines. Also, if it's about requesting permissions, you might be interested in using the above linked bits with that: https://github.com/LouisCAD/Splitties/tree/main/modules/permissions
d
DSL?
☝️ 1