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
DialogFragment onCreateView not returning custom layout view?
I'm currently trying to use a custom layout with my DialogFragment, however it seems I'm doing something wrong. This is what my class currently looks like:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
…

SpecialSnowflake
- 945
- 4
- 16
- 32
0
votes
1 answer
keeps getting red underline on my .show when I use getFragmentManager()
So here is my problem, I keep on getting red underline in my loginFragment.show(getFragmentManager(), "login");
why does it have an underline under the parameters. When I use getSupportFragmentManager and not use AppCompatActivity and use Activity…

apd
- 1
- 2
0
votes
1 answer
unable to receive data from dialogFragment in a fragment
Neither log cat is showing or toast is showing any data in fragment one. I do not want to create interface that is difficult for me as a beginner. I followed the 2nd solution from this link
please edit my code.
// Main Fragment code :
public…

Muniba Shafiq
- 11
- 3
0
votes
1 answer
date and time picker through the DialogFragment
I just want to create a Date and Time picker in Fragment class. so i directly extend my fragment to the Dialog Fragment and override the onCreateDialog. so through this i successfully create a Date Picker but i want to create a Time picker just…

Dhruv Tyagi
- 814
- 1
- 9
- 28
0
votes
1 answer
How to prevent onActivityCreated to be called in dialogFragment?
I am using a dialog fragment CDialogFragment in my app.
I need to dismiss my DialogFragment on Activity recreation.
To handle I used dismiss() method as -
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
…

Sanjay Kumar
- 1,135
- 14
- 27
0
votes
1 answer
Inherit DialogFragment from Fragment
Can I inherit DialogFragment from Fragment
I mean say I have a fragment (ABC_Fragment) and this fragment shows item details (images, buttons, labels...)
for some reasons i have to show the same fragment(XML and Java code) in dialogfragment (popup…

Yazan Allahham
- 174
- 2
- 17
0
votes
1 answer
Failed to execute DialogFragment in Fragment
When I try to execute the DialogoFragment in a Fragment, it tells me to create the Show method and I already tried with: this, getContext (), getFragmenteManager (), getActivity (). GetFragmenteManager ().
In the Activity it does not give me…

user3139428
- 83
- 1
- 2
- 7
0
votes
1 answer
DialogFragment crash on second rotation (IllegalStateException)
I am creating a DialogFragment within a fragment hosted by an activity. Here's how I create the dialog:
NewDialogEditText ageDialog = new NewDialogEditText.Builder()
.setCharLimit(2)
.setInputType(TYPE_CLASS_NUMBER)
…

SpecialSnowflake
- 945
- 4
- 16
- 32
0
votes
0 answers
DialogFrament buttons not shown in landscape
I implemented a DialogFragment with single choice list, a custom view with a checkbox and a positive and negative button in this way:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new…

TheModularMind
- 2,024
- 2
- 22
- 36
0
votes
1 answer
Android Show Dialog Fragment from SharedElement of Activities
I want to show a Dialogfragment that appear from a SharedElement of my Activity. I tried SharedElementTransition and that not working. Here is the code:
FragmentManager fm = this.getSupportFragmentManager();
AddHistoryFragment mAddHistoryFragment =…

Shohan Ahmed Sijan
- 4,391
- 1
- 33
- 39
0
votes
1 answer
How to start method from fragment b in fragment a, with specyfic show
I have a problem with starting method from fragment in another fragment.
I have 2 fragment. On with a drawer and in drawer i can choose the dialogFragment with informations. I ican open just a fragment but i want to create one fragment for all…

Rodriquez
- 981
- 1
- 7
- 21
0
votes
1 answer
How to reset input to DialogFramgment after initial build?
EDIT: Attached the code for my onCickListener which sends Rating Value to and then Show my Dialog.
I have a TextView which shows me a rating in numbers format (4.5). And when I press this TextView a dialog pops up to let me change the rating trough…

Jan Didrik
- 15
- 3
0
votes
1 answer
Prevent a ProgressDialog from being dismissed on rotation but still allow dismissal from AsyncTask
Apologies for the long title. My problem is as follows: I use a DialogFragment to prevent AlertDialogs from being dismissed on rotation (similar to the answer here: Prevent dialog dismissal on screen rotation in Android).
Now, I run some task in…

Searles
- 1,447
- 1
- 11
- 26
0
votes
2 answers
DialogFragment won't open after 30 times - android
I came across a problem in dialog fragment. After opening dialogfragment 30 times, the next one blur the screen but no content. Is there a solution??
here is parent fragment:
DialogFragment newFragment = new…

Kamran Taghaddos
- 452
- 1
- 10
- 22
0
votes
1 answer
setonclicklistener for a button in custom dialogfragment class
i have created a custom class extending dialog fragment and im using a layout to inflate into this dialog now when i want to set my onclicklistener in main activity but it returns null point exception when im setting my on click listener heres my…

caninethacher
- 3
- 2