AnkoAlert | This contains the code from my article | Android library
kandi X-RAY | AnkoAlert Summary
kandi X-RAY | AnkoAlert Summary
This contains the code from my article about creating reusuable layouts with Anko. The image to the left shows a mockup of a reusable dialog to be created with Anko, while the image on the right shows a screenshot of the implemented dialog.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AnkoAlert
AnkoAlert Key Features
AnkoAlert Examples and Code Snippets
Community Discussions
Trending Discussions on AnkoAlert
QUESTION
Using Anko library is pretty easy, but when i rotate screen, my dialog dismisses. The only way how to avoid this is to use child of DialogFragment()
with method show(fm, TAG)
.
So we need to override method onCreateDialog(savedInstanceState: Bundle?): Dialog
which returns Dialog
instance. But Anko's alert{ }.build()
returns DialogInterface
instance
So, is there any way to use anko in this situation?
...ANSWER
Answered 2019-Aug-26 at 17:17If you don't have dynamic UI then you can use android:configChanges="orientation"
in your activity in manifest, look likes:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AnkoAlert
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page