I want to show a modal pop up window with a TextView and two buttons when the user "clicks" on a ListView item.
How can I do that?
To trigger the modal window, you need to use a button or a link. Then include the two data-* attributes: data-toggle="modal" opens the modal window. data-target="#myModal" points to the id of the modal.
Modals, like pop-ups, are components that pop up on a user's screen. The key difference, however, is that the user would have initiated the action as part of their journey. Modals are used for specific workflows such as adding users, deleting content, sharing content, adding content, and more.
User can open modal in same tab by clicking left mouse button on item. User can also click middle mouse button (scrollbar) to open modal in new tab.
Take a look at the AlertDialog.Builder
class.
http://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog
The above link should provide you with all the necessary information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With