An Android Fragment that displays a dialog window, floating on top of its activity's window.
Questions tagged [dialogfragment]
444 questions
4
votes
2 answers
Starting DialogFragment from a class extending RecyclerView.ViewHolder
I tried as below at onClick() method of recyelerview.viewholder class.
SampleDialogFragment used in the sample extends DialogFragment.
@Override
public void onClick(View v)
{
SampleDialogFragment df= new…
![](../../users/profiles/4822934.webp)
Lin Lin
- 209
- 2
- 13
4
votes
0 answers
AlertDialog not visible in Hierarchy Viewer
I have a fragment-based app that I'm trying to analyze using the Hierarchy Viewer. My problem is that the views I need to analyze are not showing up in the Viewer, though they are clearly present in the emulator.
I have a FragmentActivity that…
![](../../users/profiles/2760035.webp)
TechnalyticSteve
- 236
- 1
- 7
4
votes
2 answers
Android get rid of DialogFragment floating margin
I'm displaying a dialogfragment in my app and I notice that even when I set the fragments' y position to the bottom of the screen there's still a margin visible:
Display display = getActivity().getWindowManager().getDefaultDisplay();
…
![](../../users/profiles/3149327.webp)
Jon
- 7,273
- 6
- 38
- 99
4
votes
2 answers
NumberPicker not working inside DialogFragment
I'm learning the basics of android programming and having some trouble with a NumberPicker.
I am close to what I want to have, the dialog opens and the hour and minute number pickers appear, but they do not have numbers above and below to scroll…
![](../../users/profiles/1394732.webp)
Burke9077
- 317
- 5
- 20
4
votes
2 answers
Android DialogFragment not showing when show() called in onCreate of Activity
I have a dialog fragment with a simple indeterminate progress bar in the centre, which i use to show network activity:
public class NativeLoadingDialogFragment extends DialogFragment {
public NativeLoadingDialogFragment() {
//…
![](../../users/profiles/755370.webp)
AndroidNoob
- 2,653
- 2
- 37
- 51
4
votes
2 answers
Retaining listener after screen rotation - DialogFragment with DatePicker
When clicking an EditText field in my (Scherlock)FragmentActivity a DatePicker shows up. After selecting date and clicking "apply" the Edittext field is populated with the date. This works fine until i rotate the screen while the DatePicker is…
![](../../users/profiles/2833773.webp)
Christina
- 163
- 2
- 11
4
votes
1 answer
Passing data from dialogfragment to fragment
I got an activity with three fragments and from one of these fragments i'm calling a MyDialogFragment.show()-method. Dialog appears, I do some text-input and try to pass this text-input back to fragment. So far so good.
I set up the…
![](../../users/profiles/1378311.webp)
mauricemoss
- 150
- 3
- 9
4
votes
2 answers
DialogFragment with multiple activities
I used the documentation here to create a dialogfragment. The code is :
public static MyAlertDialogFragment newInstance(int title) {
MyAlertDialogFragment frag = new MyAlertDialogFragment();
Bundle args = new Bundle();
…
![](../../users/profiles/2535490.webp)
previouslyactualname
- 673
- 1
- 10
- 23
4
votes
1 answer
Android - DialogFragment with Layout Containing Fragment
I am using a customized DialogFragment. In the onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) method, I inflate a layout that contains another fragment causing the app to crash. How can I fix it?
![](../../users/profiles/1149647.webp)
Abdalrahman Shatou
- 4,285
- 6
- 45
- 72
3
votes
1 answer
Pass touch event from dialog fragment to View right below (inside the parent activity)
As you can see in the image , red border rectangle is the parent activity . Blue one is dialog fragment . The circle is indicating a view and rectangle below is the description. I want the click on circle to be passed down to the button. So far i…
![](../../users/profiles/2991413.webp)
user2991413
- 331
- 7
- 22
3
votes
1 answer
Activity with Dialogfragment is always in the middle
The image above is my current activity with a dialog fragment. as you can see dialog is in the middle of the screen but it want it to look something like in google maps where when I click on the button the dialog appears near the button:
=>
As…
![](../../users/profiles/11150353.webp)
Jebemti mater
- 124
- 11
3
votes
1 answer
DialogFragment over keyboard
I got a login Activity with EditText.
The user starts typing and the keyboard is shown.
After some time I'm trying to show a DialogFragment (Over the entire activity AND the keyboard)
The problem is that the keyboard gets disappear.
Is there a way…
![](../../users/profiles/1039477.webp)
dor506
- 4,466
- 7
- 37
- 67
3
votes
3 answers
Generic DialogFragment with listeners
I want to create a DialogFragment subclass that can be reused accross my app. So when an Activity wants to create a DialogFragment, it can set its own texts and attach its own listeners for the positive and negative buttons. For the texts inside the…
![](../../users/profiles/1373050.webp)
Mark Buikema
- 2,211
- 26
- 51
3
votes
2 answers
Chain a Dialog Fragment Result in RxJava
How we can chain a dialog fragment within an RxJava chain and wait for its result (which button is clicked).
Something like:
buttonClickObservable.flatMap(v -> showDialogAndWaitForResponse()).subscribe(dialogResult -> doSomething());
Is this even…
![](../../users/profiles/9291997.webp)
Archie G. Quiñones
- 5,945
- 5
- 32
- 71
3
votes
2 answers
Xamarin.Android DialogFragment some LifeCycle Events not firing
I am having an issue working with Xamarin.Android (please see code below)
MainActivity.cs:
using Android.App;
using Android.Widget;
using Android.OS;
namespace DialogFragmentLife
{
[Activity(Label = "DialogFragmentLife", MainLauncher = true)]
…
![](../../users/profiles/4149141.webp)
Felix Chiang
- 121
- 5