Questions tagged [dialogfragment]

An Android Fragment that displays a dialog window, floating on top of its activity's window.

472 questions
0
votes
1 answer

ClassCastException on calling a dialogfragment from RecyclerView

I have a RecyclerView from which I am trying to call a dialogfragment but I am getting a class cast exception. I tried a lot of solutions on stack but it didn't help. Please help me. java.lang.ClassCastException: android.app.Application cannot…
user8601021
  • 219
  • 3
  • 18
0
votes
1 answer

OnItemClickListener for spinner item, issue with setOnItemSelectedListener

I want to create a time and date selection dialog, like the one in the goolgle keep app, shown when one wants to be reminded about an event in the future. The dialog has two spinner fields for the date and the time of day. The first few fields are…
Lukasz
  • 2,257
  • 3
  • 26
  • 44
0
votes
0 answers

DialogFragment Error

I need help for ERROR Help error DialogFragment, exeption on delete item list. In the code there is the warning for Fragments on DialogFragment. But I can not see where I need to resolve the warning And error in the app when calling the deletething…
0
votes
1 answer

Creating a notification inside DialogFragment class doesn't work! (Android)

I've been searching around and tried different solutions but I can't seem to get this to work. I have a MainActivity with a list and an "Add" button. When i click the addbutton i open a DialogFragment. In the dialog user inputs data and press "add"…
uckizz
  • 15
  • 5
0
votes
1 answer

Android-Dismissing a dialog fragment

I have an activity which includes an imageview. When I click on that image,a dialog fragment is shown consisting of html content and a button. When I click on that button, I want to close this dialog fragment. I tried to use function dismiss() but…
0
votes
2 answers

how to implement dialogfragment in fragment?

I have a question about dialogfragment - I created a class with dialogfragment by tutorial, but in the tutorial, the dialogfragment was shown by button click - I want to show dialogfragment by clicking on fragment tab in my MainActivity - I can't…
Matěj
  • 11
  • 3
0
votes
0 answers

Receiver not registered from DialogFragment

I tried to creating wifi manager from Dialogfragment.However, I can not pass a problem that Receiver not registered. private BroadcastReceiver mReceiver; Then, I'm creating a method is that: @Override public void onActivityCreated(Bundle…
lscodex
  • 180
  • 1
  • 6
  • 17
0
votes
0 answers

How to flip a DialogFragment

I am trying to do this animation in dialogFragment please help me how to do this. I am using Fragment and attached a DialogFragment to this Fragment. Below code (for flip animation) is working fine for Fragment, but it is not working for…
Dedeepthika
  • 305
  • 4
  • 15
0
votes
0 answers

Dismiss handling of Android DialogFragment with fullscreen on smaller devices and dialog on large devices

I have implemented custom DialogFragment to get some inputs from user. if(mIsLargeLayout) { // The device is using a large layout, so show the fragment as a dialog userDeviceDialogFragment.show(fragmentManager,…
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
0
votes
0 answers

How to receive onbackpressed within DialogFragment?

How can I receive the OnBackPressed event within a DialogFragment? I'm creating a custom DialogFragment causing it to call onCreateView() and not onCreateDialog. Therefore I'm unable to set an OnDismissListener or OnCancelListener since mDialog is…
0
votes
1 answer

Xamarin Android - Dismiss DialogFragment

I have looked on several different threads on how to dismiss a DialogFragment but nothing seems to work for me. I want to be able to close the DialogFragment when I switch to a new Activity from the click event that I have. I tried by using…
0
votes
3 answers

onBackPressed from Fragment Displays Activity Twice

I have an Application min SDK 21, target 25. Using : android.app.DialogFragment and android.support.v7.app.AppCompatActivity. The initial Activity is a Launcher it can launch 1 of 3 Activities and 1 DialogFragment. The DialogFragment can in turn…
0
votes
1 answer

DialogFragment not resizing for soft keyboard on >= API 24

I have been googling and searching Stack Overflow 2 days, but haven't found something that could help me. I'm trying to implement a DialogFragment that's fullscreen on smartphones and a modal dialog on tablets. This is how it is supposed to look…
0
votes
1 answer

DialogFragment : EditText keyboard covers whole screen in landscape mode

I have a DialogFragment with two input fields and two buttons. In portrait mode everything is fine, but in landscape mode when an input field is focused the whole Dialog disappears so the buttons are not there. Screen is then covered by a keyboard…
jreft56
  • 199
  • 1
  • 12
0
votes
0 answers

Android Error on older devices

I have an Android app which includes a dialog fragment that has 4 selections, each leading to an Alert Dialog with additional information On Click. This functionality is working for my device (Galaxy S7 Edge, Android 7.0), but I am getting reports…