Questions tagged [dialogfragment]

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

472 questions
0
votes
0 answers

DialogFragment Center Horizontal

I tried to make my dialog fill in the whole screen. Here's the code: public void onStart() { super.onStart(); AlertDialog dialog = (AlertDialog)getDialog(); WindowManager.LayoutParams params =…
Mazen
  • 203
  • 2
  • 15
0
votes
1 answer

DialogFragment animation not working for API <= 15

I'm trying to do a simple slide-in-left/slide-out-right animation for my dialog fragments. My fragments extend SherlockDialogFragment and I set the animation in onCreateDialog: @Override public Dialog onCreateDialog(Bundle savedInstanceState) { …
dnldd
  • 113
  • 1
  • 8
0
votes
2 answers

How to execute AsyncTask on DialogFragment dismiss?

What I want to do is, I guess at least, refresh a ListView when DialogFragment is being dismissed. Whole refresh process is in my AsyncTask. I found actually a lot questions/answers but nothing helpful in my case. I tried: 1)onDismiss in my…
user2917245
0
votes
1 answer

Screen jumps when calling a dialogfragment

I am calling a dialogfragment from a FragmentActivity which I am using the dialogfragment as a datepicker. I have an edittext box that fires the onFocusChangedListener to call the dialogfragment. Everything loads fine, except that the dialog and…
0
votes
1 answer

Android DialogFragment - weird transparent box

I have been implementing a very sweet camera dialog fragment, following the Android and Vogella guides for it. However, I get a transparent box in the dialog box I make (had to take the picture with a phone) And I think it has something to do with…
Wirack
  • 81
  • 5
0
votes
1 answer

TimePickerDialog in a ListAdapter: Fragment already added

I have a list which rows are created dynamically. Each row contains a EditText and when the user clicks on this view I want a TimePickerDialog to show up. I'm using the same technique somewhere else in my code, but not in a ListView, and it works…
Syex
  • 1,320
  • 1
  • 12
  • 23
0
votes
1 answer

Android setVisibility to GONE in a View part of a DialogFragment which implements OnItemClickListener

I have a class that extends extends DialogFragment and implements OnItemClickListener. In this DialogFragment I have a view called rootView, where I inflate my main view. When I press a button, I create two views: selectItemForm =…
Ziza
  • 161
  • 1
  • 4
0
votes
2 answers

Dialogfragment(Alert-Dialog) is crashing when I am trying to open it for the second time on Button Click

Dialogfragment is crashing when i am trying to open it second time on button click.This Dialogfragment shows existing mail accounts in single select radio buttons. Here is my code : public String[] allemails() { _accountMgr =…
user3177895
0
votes
1 answer

TextView NullPointerException implementing TimePicker in Fragment

Implementing TimePicker Dialog in Fragment using DialogFragment and getting ClassCastException Logcat: 02-15 02:44:29.199: E/AndroidRuntime(1297): FATAL EXCEPTION: main 02-15 02:44:29.199: E/AndroidRuntime(1297): Process: com.example.datetimeabs,…
Sun
  • 6,768
  • 25
  • 76
  • 131
0
votes
2 answers

How to make a series of interacting DialogFragments

I'm developing a small Android app and am having trouble with one small feature. I want to have a button invoke a series of Dialogs that the user can select a series of options for. For example, pressing the button will bring up a Dialog with 2…
micnguyen
  • 1,419
  • 18
  • 25
0
votes
1 answer

How to save the state of an interface in my fragment?

I have an Activity which uses a ViewPager to create three Fragments in the ViewPager class I set the Fragments to setRetainInstace(true); when they are created. Inside one of my Fragments I am displaying some editable info. This Fragment launches a…
kandroidj
  • 13,784
  • 5
  • 64
  • 76
0
votes
1 answer

Getting NullPointerException on isChecked() for a checkbox in DialogFragment

I have a checkbox in a login DialogFragment that I want to use to check to see if I should add the entered user name to the preferences. But when I do an if using the checkbox's isChecked() method I get a NullPointerException. I added a try/catch…
0
votes
1 answer

IllegalStateException when using DialogFragment with Interface Listener to return result to parent Activity

I am trying to add a Login Dialog using the DialogFragment defined in the support libary (I must use this to support older devices). I was able to use the example shown on googles page at: http://developer.android.com/guide/topics/ui/dialogs.html …
0
votes
0 answers

Width DialogFragment in Android 4 and Android 2

I make DialogFragment with choice by TableLayout. In Android 2.3.3 it's show as I want - width=wrap content (but divide doesn't show). http://prntscr.com/296xvr But when I test it Android 4 width of my layout stretch to screen width.…
w201
  • 2,018
  • 1
  • 11
  • 15
0
votes
1 answer

Change button press color in Dialog Fragment?

I want to change the color of button press in a dialog like in the image below. I managed to accomplish this when using simple Alert Dialog. AlertDialog.Builder builder = new AlertDialog.Builder(this); // Set dialog…