0
votes
1answer
27 views

DialogFragment - Where to access layout components [i.e. editText.setText(“”)]

after doing a lot of research and trying (i think) every lifecycle method i could find, i´m really stuck: What i want: Basically i have this DialogFragment ("ProfileUsernameDialogFragment")which ...
0
votes
1answer
27 views

Programmaticaly add Fragment to inner ViewGroup

I'm attempting to add a two Fragments to the following layout: dialog_empty_linear_layout.xml: <LinearLayout android:id="@+id/ParentLayout" ...
0
votes
1answer
46 views

Android layout issue using Dialog

I'm developing an android application for Tablet. I have implemented a DialogFragment that look like this: The xml layout is defined by this code: <?xml version="1.0" encoding="utf-8"?> ...
0
votes
2answers
516 views

Android fragment show as dialogfragment or usual fragment

What I am trying to achieve is to have a fragment that on tablet it shows as a DialogFragment, while on smartphone it would be shown as a regular fragment. I am aware there is already a similar post, ...
0
votes
1answer
208 views

Placing dialog fragment in the center of the Screen

I have this layout in my activity, and I want to add a dialog fragment to "map_extras", however, the dialog fragment doesn't place in the center of the screen. What I'm I doing wrong? <?xml ...
0
votes
0answers
64 views

How to implement a flexible modal-like notification system in Android?

I am working on an Android application that consists of several screens, which in the former version have been Activities and are now implemented as Fragments. I want to provide a flexible ...
0
votes
0answers
164 views

Android Incorrect X-coordinates from getLocationOnScreen

I am setting the position of DialogFragments next to the buttons which opened them by getting the location of the Button Views. The calculation of the positions goes something like this (in the ...
0
votes
1answer
266 views

Android - Is it possible to change the gravity of a custom dialog?

The image below is essentially what I want to achieve, this comes straight out of eclipse as my dialog_layout.xml I want to inflate a custom dialog and have it on the right of screen to serve as a ...
0
votes
1answer
103 views

Can the FragmentManager set content within a DialogFragment?

I currently have Fragments which are both placed into normal layouts and shown as DialogFragments. Each Fragment has its own actions, most of which consist of replacing the current layout with another ...
3
votes
1answer
245 views

Android - Handle user inactivity in the application

I want to detect user inactivity in my android application. When user log on the application a thread will start execution and check the time interval. After log on the application if user interact ...
0
votes
0answers
116 views

How to embed MapFragment in DialogFragment?

I have a custom DialogFragment. It's layout consist of a button and a FrameLayout(container) for other fragment.I want to embed a MapFragment in it when the button is pressed.I get exception when I am ...
2
votes
1answer
307 views

StackOverflowError when trying to inflate a custom layout for an AlertDialog inside a DialogFragment

I'm trying to create an AlertDialog, by using the Builder and setting a custom view. When I try to inflate the view inside of onCreateDialog, I get a StackOverflowError.. Here is the code up to the ...
8
votes
3answers
2k views

AlertDialog with custom view: Resize to wrap the view's content

I have been having this problem in an application I am building. Please ignore all of the design shortcomings and lack of best practice approaches, this is purely to show an example of what I cannot ...
1
vote
1answer
73 views

How to recover param in DialogFrament like popup

I'm trying to make a connection popup like in the man: http://developer.android.com/guide/topics/ui/dialogs.html The exemple like the man is done but now I can't recover the login and the password ...
1
vote
1answer
320 views

Communicating with ViewPager and Dialogs in Android

So I've been reading about Dialogs in Android and am curious on how to implement this to my current code. I followed the android documentation to create a custom layout. I created it as a new class. ...
0
votes
1answer
179 views

DialogFragment missing content, only showing “ok” button

I'm trying to display a dialogfragment from within a viewpager fragment. For some reason. The only thing that is showing up is the positive ok Button. Can someone help me out here? Inside of my ...
1
vote
0answers
191 views

Admob in Android Fragment

I am unable to place AdMob in ActionBarSherlock Fragment. Since in Activity the ActionBar won't allow to display the xml layout but the xml file is referenced in the fragment class. I am running into ...
1
vote
1answer
2k views

Using DialogFragments. Are there bugs in the official example?

I have just copied the official example, and my dialog is very narrow. Why? My code. The dialog. package com.redplanet; import android.os.Bundle; import ...
2
votes
2answers
2k views

Android 3.2 - Customize AlertDialog Button within DialogFragment

I've created a class extending DialogFragment which returns an AlertDialog in it's onCreateDialog method, like here. The problem is, that I want to increase the standard (positive) button's height, ...
0
votes
1answer
562 views

get View of default dialog

I'm trying to implement ProgressDialog in DialogFragment and use it as a Fragment. My onCreateDialog looks like this: public Dialog onCreateDialog(Bundle savedInstanceState) { String message = ...
0
votes
1answer
219 views

DialogFragment orientation independent from main Activity orientation

My application draws a football field (SurfaceView) which is fixed in portrait orientation. A DialogFragment (translucend, so that the field is visible in the background) shows options to the user ...
0
votes
0answers
142 views

How to set up the graphical layout editor for designing dialogs

I'm trying to create a simple form to be displayed in dialog field. It looks ok in the layout editor, but when it is displayed on the screen, it looks like puke. Is there a way to set up the layout ...
12
votes
4answers
8k views

Can't make the custom DialogFragment transparent over the Fragment

I need to create a dialog over a fragment (that takes up the whole screen). The dialog needs to be a floating dialog that will be positioned over the fragment with the fragment darkened out outside of ...
7
votes
1answer
5k views

change the height of custom dialog in Dialog Fragment

I have created a custom dialog, the code is below. The problem is that, the height of the dialog is becoming wrap_content, i.e it is independent of what ever the height i mention in the xml. I have ...