An Android Fragment that displays a dialog window, floating on top of its activity's window.
Questions tagged [dialogfragment]
472 questions
0
votes
3 answers
using a simple dialog fragment in android
I am trying to launch a timePicker on click of edittext
I have constructed most of the things !
Buffet_offerings_breakfast_menu2.java
import java.util.Calendar;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import…

smriti3
- 871
- 2
- 15
- 35
0
votes
2 answers
Can't show Toast inside AsyncTask inside a DialogFragment
I'm using a DialogFragment to show a simple form, which then is posted to a remote server and a success/fail code is sent back.
However whenever I want to show a Toast when an error occurred I get an exception in which getActivity() returns null.…

Sandy
- 2,572
- 7
- 40
- 61
0
votes
1 answer
Return data from DialogFragment to MainActivity
I'm trying return a String from the DialogFragment, following this instructions https://stackoverflow.com/a/14808425/2933117 , but I only get logcat error
java.lang.ClassCastException: com.example.testinterface.MainActivity cannot be cast to…

naxo
- 153
- 2
- 2
- 18
0
votes
1 answer
Retained the Message Dialog after the Power on the Device in Android?
I have the Message Dialog and I wanted to retained the state of the dialog also wants to stay the dialog as it is.
Scenario 1 : I opened the Message Dialog after that I press the Power off the Device. When I press the Power on of the Device the…

Swift
- 829
- 2
- 12
- 33
0
votes
2 answers
how to implement onCompleteListener for DialogFragment
Am trying to implement an onCompleteListener for my DialogFragment.but am having errors attaching the fragment to the activity.If i leave out the
public void onAttach(Activity activity) {
try {
this.mListener = (OnCompleteListener)…

mungaih pk
- 1,809
- 8
- 31
- 57
0
votes
2 answers
What would I use to grab a TextView from the MainActivity within a DialogFragment?
I'm writing a simple app that opens up a time picker dialog, asks for input, checks it against the system time, and tells you whether or not it is correct. However, I need to grab the TextView that displays whether it is true or false, and change…

Bandit Bat
- 25
- 1
- 8
0
votes
0 answers
DialogFragment not showing
I have problems showing a DialogFragment on an activity.
I found a lot of other posts about this issue, but I couldn't find a solution.
This is my Activity:
public class MainActivity extends FragmentActivity {
@Override
protected void…

sthor69
- 638
- 1
- 10
- 25
0
votes
1 answer
How to dismiss dialog fragment after screen rotation (how to get the reference to the fragment)
I'm showing a dialog fragment like progressDialog.show(getSupportFragmentManager());
When my thread finishes, the dialog is dismissed. This is not working after screen rotation, because my 'progressDialog' variable is not set.
Using…

prom85
- 16,896
- 17
- 122
- 242
0
votes
0 answers
Android Where do you put code to modify fields in dialogfragments?
I am creating a DialogFragment that I use for my login dialog. I want to have autocompletion for the email addresses that are used as user ids. I found a good tutorial here, but it didn't really deal with using a DialogFragment.
My current code…

Rben
- 489
- 1
- 7
- 18
0
votes
0 answers
DialogFragment not visible but selectable
I have a very strange problem on Android using DialogFragments.
I have a FrameLayout with no content and the OnClickListener set to open a FragmentDialog where the user can choose what type of content he wants to add.
If I choose an image from the…

FredFS
- 33
- 3
0
votes
3 answers
Showing a DialogFragment object from an on click inside a button listener
I was just trying showing a DialogFragment object from an on click inside a button listener.
Here is the code of the activity that should start the Dialog:
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import…

Stefano Munarini
- 2,711
- 2
- 22
- 26
0
votes
1 answer
How to refresh the ListView after change the data with the DialogFragment?
I create a custom dialog with DialogFragment, and in the dialog, I can add some data to the SQLite database. Also, there is a listview in the main activity, which show the data of the SQLite.
I want to refresh the listview when I add the data to the…

rookiepeng
- 3
- 1
- 2
0
votes
1 answer
Terminating a DialogFragment using a onclicklistener
I'm trying to create a DialogFragment class that allows you to enter in four fields, and click a "done" button. Upon clicking the button, the DialogFragment should change certain text values and then terminate back to the main screen.
So far I have…

Daniel Imberman
- 618
- 1
- 5
- 18
0
votes
1 answer
YesNo Button Click Handlers on DialogFragment [Mono for Android]
I have a ListFragment that has checkboxes on it...
public class ViewOrderLineFragment : ListFragment {
public override bool OnOptionsItemSelected(IMenuItem item){
switch (item.TitleFormatted.ToString()){
case…

Aj Grandeza
- 75
- 1
- 8
-1
votes
1 answer
Listener not implemented when inflating dialog-Android
I'm trying to inflate a custom dialog in my "CreateShoppingListMenuFragment" I've followed android's documentation but seem to be having a problem with the Listener, I know FragmentManager() is deprecated and used both parentFragmentManager & child…