An Android Fragment that displays a dialog window, floating on top of its activity's window.
Questions tagged [dialogfragment]
472 questions
0
votes
1 answer
How to make a custom DialogFragment in Android?
I am trying to show a custom dialog from a fragment. When it is about to be displayed the screen gets darker, but no dialog is presented. I also tried to show it from the activity containing the fragment, but I get the same result.
Here is the…

Dinu Nicolae
- 1,019
- 2
- 17
- 42
0
votes
1 answer
IllegalStateException while using nested DialogFragments with Navigation Library
I am using Navigation library (2.2.0-rc04) and I have two DialogFragments. First one is A, opened from MainFragment. Second one is B and it is just an alert dialog for confirmation opened by A. Here is the the overall structure of the related…

Mehmed
- 2,880
- 4
- 41
- 62
0
votes
0 answers
Instant Apps: Problem with using DialogFragments or AlertDialogs in Instant App on a specific device Xiaomi Redmi S2 (Android 8.1)
I have been facing problems when using DialogFragments or AlertDialogs on Xiaomi Redmi S2 (Android 8.1) while deploying an instant app. For the rest of the devices that I have tested everything seems to be just fine.
The problem occurs when I get to…

Marija
- 422
- 4
- 12
0
votes
1 answer
Find a reference to AppCompatDialogFragment
In my Andriod app, I've got a Dialog extended from AppCompatDialogFragment. I show it immediatelly in my App's main Activity's onCreate:
@Override
protected void onCreate(Bundle savedState)
{
super.onCreate(savedState);
// ....
if(…

Leszek
- 1,181
- 1
- 10
- 21
0
votes
2 answers
How can I make specific text argument bold in android dialog fragment
I would like to make the message arguments text bold given the following string file.how can i make it?
code is given blow:
Current Reading: %s m³ \nPrevious Reading: %s m³ \nConsumption Reading: %s…

Sefu Zephaniah
- 3
- 3
0
votes
2 answers
Dialog Fragment is not appearing after device is rotated
i have a dialog fragment when i rotate the device the dialogFragment is not appearing.
please look at the images to better understand
[![this is how the dialog looks][1]][1]
[![this is how i want to be][2]][2]
launching the dialog
ft =…

ismacil jama
- 69
- 1
- 7
0
votes
1 answer
Can I do some work after DialogFragment.dismiss()
I have a DialogFragment and I have to show AlertDialog with some information after my dialog dismiss. Can I show AlertDialog after dismiss?
Her is my code:
mContinueBtn.setOnClickListener(new View.OnClickListener() {
@Override
…

skatty
- 11
- 1
0
votes
1 answer
How to use getActivity.getLayoutInflater() in custom dialog class
I create a class for custom dialog and I used PrettyDialog. I want an edittext on dialog. I use Inflater but Error: getActivity -> mHost:null. I tried create getTextDialogFragment() method, then getLayoutInflater error mHost null. What can I do fix…

CEng
- 53
- 7
0
votes
1 answer
How to avoid android application crash, when setOwnerActivity(Activity activity) in custom DialogFragment causes nullpointerException?
I got a very strange exception while using Sharedpreferences and DialogFragment:
Unable to start activity ComponentInfo{com.example.barta1.site_patrol/com.example.barta1.site_patrol.MainActivity}:
java.lang.NullPointerException: Attempt to invoke…

Newbie1001
- 131
- 11
0
votes
1 answer
Passing values around
So I have an app where I need to select a date for a filter and the selecting works fine but I can't seem to change a value on the selection screen. This is where I call the SelectDateFragment. There is more code but that isn't important for…

Simon Fox Kuuse
- 1
- 5
0
votes
1 answer
How to start dialogFragment from RecyclerView Adapter
I want to start a dialogFragment on recycler view item click in RecyclerView Adapter
I tried
FragmentManager fr = ((Activity)context).getFragmentManager();
AnswersDialogFragment msgDialog = new AnswersDialogFragment();
msgDialog.show(fr,…

AYMEN SOUMER
- 175
- 2
- 8
0
votes
1 answer
Bind custom DialogFragment to service initialized into Application scope
I'm working to an application that makes some webcalls and I want to add a DialogFragment (with a ProgressBar at the center) that shows when I'm waiting for the call to complete.
Webcalls are extended from AsyncTask with a private library that gives…

Alexsius
- 1
- 2
0
votes
0 answers
Buttons in dialog fragment are invisible, but why?
I don't know which code to post, so I just post the Code of DialogFragment:
public class dialog_ChangeActivity extends AppCompatDialogFragment {
private static final String TAG = "dialog_ChangeActivity";
private ArrayList…

HydroHeiperGen
- 121
- 7
0
votes
1 answer
DialogFragment is empty on usage (Android Studio)
I moved a bunch of code over to being a DialogFragment in my program, and suddenly the Dialog is empty.
Tried to input other data like Textviews etc, but they also don't show, so I figured the issue is how i'm coupling the Layout file with the…

Oliver H. D.
- 315
- 1
- 6
0
votes
0 answers
DialogFragment is not dismissed in live for some scenario
I am using a AppCompatDialogFragment. My dialogFragment is not dismissed in some scenario.
The scenario flow is
Showing the dialogFragment
dialogFragment UI has a Button.In button click a api is called and after api response i dismiss the dialog…

Abu Yousuf
- 5,729
- 3
- 31
- 50