An Android Fragment that displays a dialog window, floating on top of its activity's window.
Questions tagged [dialogfragment]
472 questions
-1
votes
1 answer
How to invoke DialogFragment from function which is out of activity and fragment in Android?
I have a DialogFragment which name is Dialog. How can I invoke it from a function which is out of activity and fragment in Android?
This is the DialogFragment:
class Dialog: DialogFragment() {
private var array = arrayOf("Yes", "No")
var a…

MMG
- 3,226
- 5
- 16
- 43
-1
votes
3 answers
Kotlin android data transfer from fragment to dialogFragment
I want to pass some data from Fragment to a DialogFragment (when I click a view by using onClickListener), but the data has empty values in Dialog.
While debugging I found that VO data has no problem. (log comments in my code works correctly)
So, I…

DongDong
- 47
- 1
- 5
-1
votes
1 answer
Sending data from a fragment to an activity using an interface
This is the DialogFragment I'm trying to get the info from. I put in here two NumberPickers and want to send the numbers to the Activity. Everything works until we reach the point where I try to send the numbers (which are numerocaras and…

Kazekum
- 3
- 5
-1
votes
1 answer
Trouble accessing an ArrayList from MainActivity in my DialogFragment
I need to be able to pass my ScannedDevicesListItemDialog.java class indexes from an ArrayList (ScannedDevicesArrayList) in my MainActivity.java class.
I tried creating a function (getScannedDevicesArrayList) in my MainActivity.java class for…
user4892981
-1
votes
1 answer
Custom AlertDialog?
I'm trying to create Custom AlertDialog that gives me the full details of an item in listview when it clicks, but when I inflate the layout it won't give me proper measurements of the layouts I have created here's what I mean:

Senlers Kri
- 3
- 2
-1
votes
2 answers
How to get id of a view that opened a DialogFragment?
I add a onClick method to various EditTexts. It opens a DialogFragment.
public void eligeHora (View view){
TimePickerFragment newFragment = new TimePickerFragment();
newFragment.show(getFragmentManager(),"hadshads");
}
Now,…

Luciano Falco
- 101
- 9
-1
votes
4 answers
View element of a DialogFragment layout is not accessible by id
I have a custom DialogFragment whose layout holds just a EditText element.
Layout:

Kuldeep Yadav
- 1,664
- 5
- 23
- 41
-1
votes
1 answer
DialogFragment From RecyclerView
now i have new problem ..... i don't know how initialize dialogfragment in recyclerview and recyclerview in fragment , so who know haw to make it ?
Fragment code:
public View onCreateView( LayoutInflater inflater, ViewGroup container3,
…

Doctor Who
- 43
- 6
-1
votes
1 answer
Open DialogFragment from a Fragment - Error with FragmentManager
Hey i currently try to add a DialogFragment to a Fragment. It should open when i click on a TextView:
Fragment:
public class FragmentOneRm extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
…

Sebastian
- 408
- 1
- 6
- 11
-1
votes
2 answers
move image from outside left screen to outside right screen Android
I have a cutstom DialogFragment to show a loading message to the user. For the loading message image, I created an animation that goes from the left part of the screen (starting from outside the screen) to the right of the screen (finishing outside…

IIRed-DeathII
- 1,117
- 2
- 15
- 34
-1
votes
1 answer
Closing with Outsideclick on DialogFragment not working Android
I have a cutstom DialogFragment to show a message to the user:
public class MensajeDialogFragment extends DialogFragment {
TextView mTvMensaje;
TextView mTvTitulo;
Button mBtnAceptar;
Button mBtnCancelar;
@Override
…

IIRed-DeathII
- 1,117
- 2
- 15
- 34
-1
votes
1 answer
cannot resolve symbol R Android DialogFragment
I would like create an AlertDialog with a custom XML layout, but in my class I can't found R variable, why ?
This is my class :
public class NewTestDialogFragment extends DialogFragment {
public NewTestDialogFragment(){
super();
}
…

John Doee
- 59
- 1
- 7
-1
votes
1 answer
NullPointerException on DialogFragment at onResume()
I have a a DialogFragment that has this particular onResume code to handle the back press. Unfortunately my code keeps generating that NullPointerException (I'm catching it) but I don't know why it's happening. This happens every time the…

Brandon
- 1,401
- 1
- 16
- 25
-1
votes
3 answers
DialogFragment shows onBack button press even if I remove it
I have used the following codes for showing and canceling dialogfragment :
public static void showDialogFragment(FragmentManager fm,String type){
FragmentTransaction ft = fm.beginTransaction();
MyDialogFragment prev =…

mmlooloo
- 18,937
- 5
- 45
- 64
-1
votes
1 answer
DialogFragment without animation
I have DialogFragment with slide up animation on show. After clicking a button in dialog I start another activity without dismissing my dialog. The problem is, every time I finish an acitivity, the animation runs on dialog. Is there any way to turn…

rwojcik
- 1,030
- 9
- 18