android-dialogfragment Questions

18

Solved

Question: How does one create a callback from a DialogFragment to another Fragment. In my case, the Activity involved should be completely unaware of the DialogFragment. Consider I have public cl...
Isaiasisak asked 5/12, 2012 at 22:4

3

Solved

I need to handle the end of a DialogFragment (after a call to .dismiss) - for example, I would show a toast inside the activity that "contains" the fragment after dismiss. How do I handle the even...
Warrant asked 1/3, 2013 at 17:32

7

Solved

This should be a simple task, but for some reason I can find a way to set the title of a DialogFragment. (I am setting the dialog contents using onCreateView overload). The default style leaves a ...
Undersigned asked 4/3, 2011 at 12:31

3

Solved

I'm trying to implement a dialogFragment with custom layout in Jetpack compose but can't find any samples. Do I need to wrap the UI components inside a Card/Surface and then wrap that inside a Dial...

31

Solved

I'm trying to show an almost fullscreen DialogFragment. But I'm somehow not able to do so. The way I am showing the Fragment is straight from the android developer documentation FragmentManager f...
Hydrastine asked 25/8, 2011 at 11:59

4

Solved

I have gone through some solutions but none solve my issue. I have created a custom DialogFragment. and root element of dialog is cardView. I set cardCornerRadius of cardView. Then i try to ...
Oswald asked 30/3, 2016 at 12:38

2

Solved

I'm learning Android programming with IntelliJ right now and got a little problem. I've got an Activity which looks like this: public class example2 extends Activity { ...some code... public bo...
Colubrid asked 31/10, 2015 at 23:29

1

Solved

After doing some research i found out that i need to clear the list that i am using each time i refresh the activity, after trying it to refresh the list at different places, the result remains the...
Segregation asked 16/12, 2021 at 21:39

7

Solved

I'm using dialog fragment. The problem is that the status bar color is changed to black. How to change it to some other color? It's strange cause inside fragment, activity it works fine. Its only b...

7

Solved

I am making full screen dialog with dialog fragment. I am successfully shown dialog but problem is in its width and height. It cannot shows full screen size. I want to set width and height with acc...
Rebatement asked 30/8, 2016 at 6:24

4

I try to implement a callback from a DialogFragment. There is a good example, but they don't open this DialogFragment from a Fragment. http://developer.android.com/guide/topics/ui/dialogs.html#Pass...

2

Solved

Im trying to display an DialogFragment with match_parent both for height and width but it happens that on top the DialogFragment is being displayed below StatusBar. The DialogFragment is applying ...

4

I'm creating an app which changes status bar color dynamically. My method in main Activity class works fine when called from any fragment. Fragments are placed in Activity pager: public void set...
Santanasantayana asked 29/7, 2015 at 12:39

3

Solved

I have a dialog fragment that initializes Google plus views, sometimes those views fail so I'd like to kill the dialog at that point, before it's displayed to the user. How can I end the dialog cr...
Jude asked 24/7, 2013 at 6:47

4

Solved

I have a dialog Fragment which look like that. AlertDialog ad = builder.create(); Drawable d = new ColorDrawable(Color.BLACK); d.setAlpha(130); ad.getWindow().setBackgroundDrawable(d); This co...
Trifurcate asked 11/12, 2013 at 19:47

3

Solved

I'm trying take screenshot of a cardview which is in a DialogFragment. When I take a screenshot via Code. Top rounded corners are not showing but the bottom rounded corners are showing correctly. I...

5

Solved

I have a FragmentActivity that hosts a DialogFragment. The DialogFragment perform network requests and handles Facebook authentication, so I need to retain it during rotation. I've read all the o...

3

Solved

There's a blue line appearing on top of my dialog fragment that I can't get rid off(I don't even know why does it appear in the first place. Does anybody know on how to get rid of this? I have t...

10

Solved

Google recommends that we use DialogFragment instead of a simple Dialog by using Fragments API, but it is absurd to use an isolated DialogFragment for a simple Yes-No confirmation message box. What...

11

Solved

I have an android activity that implements a custom dialog.The application is running ok but the dialog is too small,i want to display a bigger dialog.How can i achieve this? Here is my layout xml ...
Peppel asked 2/10, 2013 at 9:27

5

Solved

I launch my dialog fragment using FragmentTransaction ft = getFragmentManager().beginTransaction(); MyDialogFragment dialog = new MyDialogFragment() dialog.show(ft, "dialog"); then to get a han...

4

Solved

I've had a subclass of DialogFragment (android.support.v4.app.DialogFragment) in my app that worked fine for a long time. The dialog itself was constructed in onCreateDialog() callback. Now, howev...
Chafin asked 18/1, 2017 at 22:32

6

I want to show a DialogFragment with no title, buttons, etc.(i.e, none of what is included in a typical Dialog) but just a ProgressBar spinner on a plain background. For a rough idea, the backgroun...
Functional asked 6/7, 2017 at 7:31

2

I need to intercept all touch events in the application to monitor for a custom activity time out. Currently I use dispatchTouchEvent() in my activities but this is not called if I have a dialog o...
Oftentimes asked 15/4, 2013 at 20:36

1

Solved

I'm trying to create a stand-alone unit test for a DialogFragment, so the DialogFragment can be tested on its own. I'm using FragmentScenario to launch the DialogFragment, right now I'm trying to c...

© 2022 - 2024 — McMap. All rights reserved.