DialogFragment is a fragment that displays a dialog window, floating on top of its activity's window
5
votes
2answers
44 views
How to retained the state of Date Time Dialog on orientation change?
On the orientation change, the Activity is recreated and Date Time Dialog also recreated.
I want to save the State of the Date Time Dialog that has been changed by the User.
Before I Dismiss the ...
0
votes
2answers
21 views
Dialog Fragment Not Displaying on Launch
So I have some application, on startup it launches a splash screen activity and checks to see if a user account has been linked to the app. If one has the app launches the main activity and bypasses ...
1
vote
1answer
25 views
Show DialogFragment in a Child Activity Android
In MainActivity.java, I extends TabActivity to use Tabhost.
public class MainActivity extends TabActivity
In each Tab, I use ActivityGroup to manage some child activity
public class ...
0
votes
2answers
43 views
+50
DialogFragment animation of layout and “Attempting to destroy the window while drawing!” error
I have a DialogFragment which has some animations of some of the layouts inside its view.
When I dismiss the dialog, I want to perform an animation and when the animation has ended, perform the ...
0
votes
0answers
10 views
Showing SherlockDialogFragment in runnable makes owner SherlockFragmentActivity Edittext not working
I've been struggling with this since yesterday but I can't figure out why showing a SherlockDialogFragment in a runnable passed to the post method of a handler (UI thread) makes the edittext of the ...
1
vote
1answer
13 views
Destroy DialogFragment on onCreateDialog()
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 ...
2
votes
1answer
42 views
Customizing DiaglogFragment Window
I want to resize the width and height of my DiaglogFragment window but the code below does not give the resized version of my dialog window but instead the main activity view has been modified. I also ...
0
votes
1answer
22 views
Android - DialogFragment not Showing
I wanted to display a dialog by the time I press back button but the code below does not execute and display the FragmentDialog. Thanks in advance.
//BackPress
public void onBackPressed() {
...
0
votes
0answers
10 views
DialogFragment with a view that contains a fragment
I'm trying to put a facebook sdk fragment into a DialogFragment, to display the facebook fragment in an dialog, instead of an activity.
So my Activity is a FragmentActivity. There is a fragment that ...
2
votes
0answers
16 views
Why is an EditText required for SoftInput to show in a DialogFragment?
I have a custom class that extends a DialogFragment. I came across some interesting behavior. If an EditText is added dynamically, when focused the SoftInput keyboard doesn't show.
@Override
public ...
1
vote
1answer
32 views
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 ...
0
votes
2answers
35 views
Run a method after a dialog is dismissed - Android
I have a fragment that creates a dialogFragment with no buttons. I want the fragment to run a method after the dialog has been dismissed by either the back button or by clicking outside of the dialog. ...
0
votes
0answers
10 views
how to set data from one activity to another activity layout
I m using a date fragment 3 answer given :
Date + Time Picker in DialogFragment implements OnDateChangedListener and OnTimeChangedListener
I m opening this link from another activity :
...
1
vote
0answers
71 views
Custom dialog linear layout weight issue
I am using a linear layout view with a custom dialog ,when I run the code bellow, weight is not working correctly as the red view takes the green view's weight and verse vise as image bellow:
but ...
0
votes
2answers
49 views
setAdapter() causes NullPointerException in (Sherlock)DialogFragment
I'm trying to set an ArrayAdapter for a ListView inside the onCreateDialog() method of a (Sherlock)DialogFragment. I'm getting just NullPointerException but I think the path to the layout and ...
0
votes
1answer
19 views
How to specify a minimum width for FragmentDialog?
How to specify a minimum width for FragmentDialog?
class TestImage extends DialogFragment{
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder adb = new ...
0
votes
1answer
34 views
setOnShowListener () not working in DialogPreference
I am implementing a DialogPreference in a class. I want that when the positive button of the dialog is clicked, the dialog should not dismiss. I am using the logic from this answer.
Insided the class ...
0
votes
1answer
28 views
InvocationTargetException in DialogFragment & NumberPicker
I'm trying to show a NumberPicker in a dialog in order to let the user select a value between 0 and 10. It's my second day spent trying to make it work.
This is what I have:
fragment_number_picker ...
0
votes
1answer
46 views
ClassCastException in DialogFragment in Android
I am new to Fragments in Android. Just tried to learn about DialogFragment. But it says classcastException.
public class FragmentDialog extends Activity {
@Override
protected void ...
0
votes
2answers
30 views
DialogFragment giving NullPointerException
I was trying a code given by google here and i am getting a NullPointerException because getActivity() in mDialogFragment is returning null.I can't understand why??Can someone explain what is my ...
1
vote
1answer
33 views
android error while using dialog fragment
I am implementing a dialog fragment which should open when i click on an item in a gridview of images. here is my code
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
...
0
votes
2answers
51 views
Closing alert dialog using menu
I have an alert dialog with some items. I need to close the dialog when the user clicks the menu button without giving any options to close. How can I do that?
Here is my code
CharSequence[] cs = ...
0
votes
0answers
6 views
Android: when a fragment is removed, are fragments that were added to it destroyed?
Consider Activity A with Fragment F added to it programatically. Added to F is an AlertDialogFragment D via: D.show(F.getFragmentManager(), "alert")
If F is removed from A and destroyed, is D ...
1
vote
2answers
71 views
Is there anyother way to call a method in FragmentActivity other than starting it using intents?
Is there any other way to call a method in FragmentActivity other than starting it using Intents?
Can anyone please help?
Code is given below:
class MainActiviy extends Activiy{
//some code
...
1
vote
1answer
34 views
DatePicker Fragment leaks when I turn the screen
I'm using the DatePickerFragment class to set data to a textView.
The class is working, but when I turn the screen the aplication crashes.
The code of DataPicker class:
class DatePickerFragment ...
1
vote
1answer
58 views
error in DialogFragment show() method
I am getting java.lang.IllegalStateException: Activity has been destroyed. when i try to show a dialogfragment from an activity.
I have seen many solutions in stackoverflow but those didnt solve my ...
0
votes
2answers
97 views
How to make this simple dialog fragment semi-transparent
I am trying to make this simple Dialog semi-transparent:
class TestDialog extends SherlockDialogFragment
{
public TestDialog()
{
super();
}
@Override
public ...
0
votes
1answer
21 views
Check if fragment displayed as dialog to change click listener behavior
I am creating an app in which the user should be able add people for meetings.
The structure consists of several fragments managed in the same activity (list_people, person_detail, create_meeting).
...
0
votes
2answers
82 views
Android - ListView doesn't scroll inside DialogFragment
I am starting developing for Android. I wanted t create my sort of modal alert (like UIAlertView in iOS). I considered using Activity which worked fine. It took some time for me to do it. But later, I ...
0
votes
1answer
37 views
AndroidRuntimeException: requestFeature() must be called before adding content
I have dialog fragment. I have intention to use this fragment in activity and dialog. And I override onCreateDialog and onCreateView method. here is coding.
@Override
public View ...
0
votes
2answers
50 views
How do I setText() in an textView from a DialogFragment
I have a custom DialogFragment with a couple of options inside of it. The user is simply presented with a "Done" button in the Dialog to signal that they have completed their choice and to resume the ...
0
votes
1answer
55 views
Android DialogFragment shows black parts of screen Sony Xperia U
I use DialogFragments in my game for some popup information. It works fine on LG Nexus 4 running android 4.2 and it runs fine on the Desire S running 2.3.
It does however not run correctly on a Sony ...
0
votes
1answer
61 views
Android DialogFragment doesn't dismiss
I have a custom dialog in Android, i create the dialog view on the onCreateView method.
public class FiltroDialog extends DialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, ...
0
votes
0answers
28 views
how to implement Dialog using DialogFragement?
I am developing android apps in that i want to develop dialog using SherlockDialogFragment for support all version of the android and this dialog having 4 edittext so user can fill the data and submit ...
0
votes
1answer
20 views
Trying to make the text larger in my Spinner widget in my DialogFragment in Android
I have a DialogFragment in my application with a spinner display -- with tiny, tiny text. I'd like to display the text larger and spent a fair amount of time searching SO for solutions. However, ...
0
votes
0answers
36 views
refresh fragment when dialogFragment dismiss
in my application, my Fragment AppointmentFrag contains a customListView which load data from database
on itemClickListener of listView, i open a DialogFrament
This is my itemClick method
@Override
...
0
votes
2answers
89 views
How to desing a reusable DialogFragment
There is some questions already close to this question but they haven't been very helpful for me. So here comes a new one.
I have an Activity which has two tabs. Each tab contains a ListFragment ...
0
votes
1answer
110 views
ProgressDialog doesn't set indeterminate mode onProgressUpdate
i'm trying to manage different tasks inside one AsyncTask updating a progressDialog with a dialogFragment.
Every things i do on the progress goes right except the indeterminate mode.
This is an ...
0
votes
0answers
30 views
Android dialog fragment, with tabs or flipper
I'd like to create a DialogFragment that has a set of options and when a specific option is click the dialog changes and displays a new set of options (sub options of the category previously chosen).
...
0
votes
1answer
38 views
Android custom FragmentDialog error
I'm trying to do a custom DialogFragment in Android with a Spinner and two EditText, but I'm getting an error when I open the Dialog.
This is my DialogFragment class that is embeded into the activity:
...
0
votes
1answer
50 views
DialogFragment and force to show keyboard
I have a problem with my DialogFragment. So to create my view, I use the method described on the android blog.
Here is my DialogFragment
@Override
public View onCreateView(LayoutInflater inflater, ...
0
votes
1answer
35 views
Cancel the dismiss of a DialogFragment after PositiveButton clicked
I have extended a DialogFragment. It just has an EditText and Accept and Cancel buttons.
Inside it, a text is entered to an EditText; then, upon clicking Accept, the text is checked using try/catch.
...
0
votes
1answer
132 views
Pass the user input from an alert dialog to the activity and process it once the dialog dismisses in Android?
I have a pop-up dialog that asks for a user input.
Once the user entered his/her input and then click 'OK', I wish the fragment to pass the user input back to the activity that is just behind the ...
0
votes
0answers
34 views
How to attach event to EditText in DialogFragment using view from xml resourcefile
I have a class that extends DialogFragment and I set the view from xml source using
LayoutInflater inflater = getActivity().getLayoutInflater();
//Inflate and set the layout for the dialog
...
0
votes
0answers
23 views
How to put a view over DialogFragment?
I intend to put a mask view over my FragmentActivity, but it did not overlay DialogFragment when dialog showing, it seems DialogFragment is the top most in FragmentActivity, how could I make it?
...
0
votes
0answers
72 views
Nested DialogFragment gets dismissed after rotation
I have a nested(!) Fragment that shows my PhotoNoteDialogFragment:
private void newPhotoNote() {
mPhotoDialog = PhotoNoteDialogFragment.newInstance(this);
mPhotoDialog.show(getFragmentManager(), ...
0
votes
1answer
64 views
DialogFragment created by an event from a button in a custom ArrayAdapter always has same position
I'm a newb so try to be patient with me
Here is some background information about the problem I am having:
I have a fragment, ViewFragment, that consists of two components: a Spinner and a ListView. ...
0
votes
1answer
64 views
Twitter callback URL from DialogFragment
I'm using the Twitter4j library to implement Twitter into my application. I have a DialogFragment which holds a WebView and allows the user to sign-in to their Twitter account with my app. It allows ...
0
votes
1answer
39 views
FragmentDialog animate an layout on dismiss
Here is what I do:
a. The FragmentDialog has an layout inflated within onCreateView
` View layout = inflater.inflate(R.layout.my_layout, null);
layMain = (LinearLayout) ...
0
votes
2answers
50 views
DialogFragment's Dialog loses set properties after a conf change
I created a progressdialog following the new "fragment way" with this code:
public class DialogUpdateTrackRecords extends DialogFragment {
public static DialogUpdateTrackRecords newInstance() {
...