• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to setup Dialog box ?

omerjerk

Lurker
I want to create a dialog box where a paragraph is written using ScrollView and a close button ...

The dialog should be opened from the main activity by clicking on a button ..

Can you guys provide me necessary xml and java code for this ??

A nice tutorial is always appreciated ... :)
 
What problem are you having, exactly? What have you already tried to resolve the issue? Can you post the code you have related to your problem?
 
Have you try a "toast" notification?
A toast notification is a message that pops up on the surface of the window. It only fills the amount of space required for the message and the user's current activity remains visible and interactive. The notification automatically fades in and out, and does not accept interaction events.
 
You were not very clear...but it sounds like you want to pop up a dialog box from an activity, solicit input in the dialog box, then return the data you solicited in the dialog box to the activity so that you can do something with it.

I did that about two weeks ago. I used these two tutorials as a basis:

Opening a DailogFragment on an item click in Android | Knowledge by Experience

^For making a fragment dialog box with a custom view.

Implementing Custom Alert DialogFragments :: AruSahni.net

^For making a fragment dialog/alert box with said custom view, and collecting/returning input.

It's a pretty big chunk of code and XML to post...so try those two tutorials...if you are still confused afterwards, let me know and I will post my code and XML.
 
Back
Top Bottom