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

How to override back button for BottomSheetDialogFragment?

I know you can override public void onCancel(DialogInterface dialog) but that returns both if the user touches outside of the dialog or if they press the back button. I just want to get if the user presses the back button.
Tim Nuwin
  • 2,775
  • 2
  • 29
  • 63
0
votes
1 answer

Click behind fragment when DialogFragment is shown

I need to have access for click on my behind fragment ( such as click on a button ) when DialogFragment is shown. But when I click outside of DialogFragment, this will dismiss. Used code to show DialogFragment: FragmentManager fragmentManager =…
0
votes
1 answer

DialogFragment not appearing

For some reason, a DialogFragment that I've just created won't appear whenever I try to launch it from a click event. Why does the dialog not have a view, when my view has been clearly set builder.setView(rootView)? Fragment does not have a…
wbk727
  • 8,017
  • 12
  • 61
  • 125
0
votes
3 answers

Android getting OutOfMemoryError when instantiating a DialogFragment

I am reading this from Google about using DialogFragment. Everything works until the section Creating a Custom Layout: when the call is done to display a DialogFragment with a custom layout I get a OutOfMemoryError exception. I have just slighty…
eqtèöck
  • 971
  • 1
  • 13
  • 27
0
votes
0 answers

Fix overscan in DialogFragment title in Android TV

I have this problem that seems simple, but I can not find a solution anywhere... As you probably know, an Application that is intended to run in an Android TV, should take into consideration the overscan. So, as described in the link above, I added…
n3mo
  • 663
  • 8
  • 23
0
votes
0 answers

Toast shows up late when coupled with Dialog Fragment

I have an adapter class that handles displaying a list of thumbnail images. When the user clicks on a thumbnail, it retrieves an image from a URL and takes about a second to do so and displays it in a dialog fragment. Because of the delay, I want…
Samuel
  • 395
  • 2
  • 5
  • 20
0
votes
3 answers

FragmentManager.beginTransaction() on null object reference when trying to add new dialogFragment to a exsisting dialogfragmen whicht is on a fragment

this is not a duplicate question as the occurrence of the issue is different.. as i am only experiencing this behavior when i try to do exact what i have mentioned(layout order wise) i am trying to create a new dialog fragment trough another dialog…
RAINA
  • 802
  • 11
  • 22
0
votes
1 answer

Repositioned DialogFragment hit area for setCanceledOnTouchOutside has an unexpected margin

I am using a dialog for a filter option. The design for tablet involves the dialog appearing below the image button that made it appear. I feel the user expectation would be that they could click the button again to hide the dialog. The problem I…
TTransmit
  • 3,270
  • 2
  • 28
  • 43
0
votes
2 answers

App falls down with API 27 but wolks correctly with API 21

I`m trying to set title text size for DialogFragment I coded for my old test device (Android 5.0 API 21) and all was ok But app falls after I began to use new test device (Android 8.1 API 27) @Override public View onCreateView(LayoutInflater…
Kirguduck
  • 748
  • 1
  • 9
  • 20
0
votes
0 answers

Dialog fragment disappears when orientation changes

I have a dialog fragment that displays a view. When I show the view it works fine. Though when I change the orientation of it from landscape/portrait or vice versa, the dialog fragment disappears. I've tried several suggestions though none have…
TeleJim
  • 317
  • 3
  • 20
0
votes
1 answer

DialogFragment change shadow(mask) color (NOT dialog content)

I am building a dialog with DialogFragment, and I need to change the color of the shadow (mask), which is transparent and always around the main dialog content. Actually, almost all of the answers on the web is to change the dialog box color, but I…
Karass
  • 21
  • 2
0
votes
1 answer

"Can not perform this action after onSaveInstanceState" exception after rotate device

I have a ViewHolder and in bindView() method set a OnLongClickListener. When I rotate device and long click on list item java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState exception occurs. I've already override…
Hamed
  • 5,867
  • 4
  • 32
  • 56
0
votes
1 answer

Dialog with Gridview sometimes doesn't load

I'm making an app that makes use of a GridView to display subcategories. I have the categories displayed on screen and when clicked a dialog appears with a GridView displaying subcategories and a button to view everything in that category. Here's…
0
votes
1 answer

setOnClickListener for DialogFragment's button?

I'm showing a DialogFragment when a user clicks on the Customize button for an item. btnCustomize.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ CustomDialog dialog = new CustomDialog(); …
user9728650
0
votes
0 answers

Dialog crashes when calling a method

EDIT: Solved I am struggling with this issue for a couple of hours and couldn't find any solution that worked for me. So, my application crashes when I press the Send button. The firebase stuff is working fine, but when I want to display a toast…
Tester
  • 139
  • 2
  • 8