Creating Reusable Dialog In MVVM | Part 2 -Sending Event| Android
<p>This is the second part of the series of creating reusable dialog. In the <a href="https://medium.com/@sdevpremthakur/creating-reusable-dialog-in-mvvm-part-1-android-b2f6305ac097" rel="noopener"><em>previous article</em></a>, we learned, how to share data between parent (activity or fragment) and dialog in MVVM. In this article, we will send events (item selection in the list) from dialog to the parent and handle it as well.</p>
<p>We will start from where we left off in the previous article. Clone and checkout branch <code>share_list</code> which contains the code of the previous article.</p>
<h2><a href="https://github.com/sDevPrem/reusable-list-dialog-mvvm-demo/tree/share_list?source=post_page-----a1ee8a495ebc--------------------------------" rel="noopener ugc nofollow" target="_blank">GitHub - sDevPrem/reusable-list-dialog-mvvm-demo at share_list</a></h2>
<h3><a href="https://github.com/sDevPrem/reusable-list-dialog-mvvm-demo/tree/share_list?source=post_page-----a1ee8a495ebc--------------------------------" rel="noopener ugc nofollow" target="_blank">This is a tutorial project for creating reusable dialog that shows a list of item and let the parent handle the click…</a></h3>
<p><a href="https://github.com/sDevPrem/reusable-list-dialog-mvvm-demo/tree/share_list?source=post_page-----a1ee8a495ebc--------------------------------" rel="noopener ugc nofollow" target="_blank">github.com</a></p>
<h1>High-Level Design</h1>
<p>Below is the HLD of the Reusable Dialog we are implementing.</p>
<p><a href="https://medium.com/@sdevpremthakur/creating-reusable-dialog-in-mvvm-part-2-sending-event-android-a1ee8a495ebc"><strong>Learn More</strong></a></p>
<p> </p>