android-dialogfragment

Pass touch event from dialog fragment to View right below (inside the parent activity)

假装没事ソ 提交于 2019-12-19 11:21:11
问题 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 have tried 1. overriding onTouchEvent in Circle View and return false 2. setOntouchListener on circle view and call activity.dispatchTouchListener and return false 3. mark dialog frgament and circle view clickable/focusable false. None of the above

DialogFragment has blue line on top in Android 4.4.2

我的梦境 提交于 2019-12-18 15:33:19
问题 There's a blue line appearing on top of my dialog fragment that I can't get rid off(I don't even know why does it appear in the first place. Does anybody know on how to get rid of this? I have tested it on several devices and it works just fine on later Android versions. My code: private void setupDialog() { final Dialog dialog = getDialog(); final Window window = dialog.getWindow(); window.setBackgroundDrawable(new ColorDrawable(0)); window.setSoftInputMode(WindowManager.LayoutParams.SOFT

Android: How to have dialogFragment to fullscreen

半世苍凉 提交于 2019-12-18 11:57:17
问题 Hello I have tried to override the theme to the dialogFragment for fullscreen but the full screen I wanted was an overlay on top of the previous activity so when the dialogFragment is opened, we still can see back activity from the padding between the screen and the dialogFragment. This is the style I have used for full screen <style name="fullscreen_dialog" parent="android:Theme" > <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">true</item> <item name=

DialogFragment setCancelable property not working

夙愿已清 提交于 2019-12-18 11:15:28
问题 I am working in an android application and am using a DialogFragment to show a dialog and I want to make that DialogFragment not cancelable. I have made the dialog cancelable property to false, but still its not affecting. Please look into my code and suggest me a solution. public class DialogTest extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return super.onCreateDialog(savedInstanceState); } @Override public View onCreateView(LayoutInflater

DialogFragment setCancelable property not working

半城伤御伤魂 提交于 2019-12-18 11:15:08
问题 I am working in an android application and am using a DialogFragment to show a dialog and I want to make that DialogFragment not cancelable. I have made the dialog cancelable property to false, but still its not affecting. Please look into my code and suggest me a solution. public class DialogTest extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return super.onCreateDialog(savedInstanceState); } @Override public View onCreateView(LayoutInflater

android: how do I check if dialogfragment is showing

本秂侑毒 提交于 2019-12-18 10:31:50
问题 I launch my dialog fragment using FragmentTransaction ft = getFragmentManager().beginTransaction(); MyDialogFragment dialog = new MyDialogFragment() dialog.show(ft, "dialog"); then to get a handle on it I do Fragment prev = getFragmentManager().findFragmentByTag("dialog"); but once I get prev , how do I check if it is showing? Back Story My problem is that my looping code keeps launching the dialog again and again. But if the dialog is already showing, I don't want it to launch again. This

Return values from DialogFragment

北战南征 提交于 2019-12-18 07:00:05
问题 I am doing task in which I need to show a dialog after clicking on EditText . In that dialog I show contents with RadioButton s using RecyclerView . Now, what I want to do is, after selecting RadioButton (content which is in the RecyclerView) from dialog, it should return value of that content and then dialog should be dismissed. To generate a dialog I've used a DialogFragment . As I'm new in android development, I am totally confused and unable to find the solution. 回答1: Because your dialog

Retrieve and set data from DialogFragment (DatePicker)

久未见 提交于 2019-12-18 05:11:11
问题 My DialogFragment class is invoked when I press a button on a activity. I want the date set through this DialogFragment to be displayed on the buttons text. FindViewById refuses to be recognized by the class. I found a similar question but I'm unable to relate it to my case. Code: Button which calls the Dialogue fragment: public void datepicker(View v) { DialogFragment newFragment = new DatePickerFragment(); newFragment.show(getFragmentManager(), "datePicker"); } Code for dialogue fragment:

Android 6.0 Dialog text doesn't appear

末鹿安然 提交于 2019-12-18 03:03:10
问题 I updated my phone to Android 6.0 and I have these 2 problems with dialogs: 1)The title is shown but the messages isn't for alert dialog(SOLVED): new AlertDialog.Builder(context).setTitle("Title").setMessage("Message"); 2)Also custom dialog fragment's title is not shown(NOT SOLVED): getDialog().setTitle("Title"); There was not such a problem in lollipop or in older versions, the problem appeared only after updating my phone to marshmallow. How to solve the problem? 回答1: Use constructor with

Maintain Immersive mode when DialogFragment is Shown

依然范特西╮ 提交于 2019-12-18 01:03:42
问题 I have an Android Application that is made using Fragments I am hiding the bars at top and bottom of my screen, using the following code. @Override protected void onResume() { super.onResume(); isInBackground = false; if(null == getFragmentManager().findFragmentById(R.id.content_container)) { getFragmentManager().beginTransaction().add(R.id.content_container,new PresenterFragment(), PresenterFragment.FRAG_TAG).commit(); } if(Build.VERSION.SDK_INT >=19) { View decorView = getWindow()