android-dialogfragment

Soft Keyboard not displaying on touch in WebView DialogFragment

半腔热情 提交于 2021-02-19 07:09:08
问题 Edit: I have looked at the error page for this; no answers work. It seems it is an Android system bug that has not yet been solved. First off I've referred to this similar question. But the solution to that question does not seem to be the solution to mine. I have a DialogFragment that contains only a WebView . Everything in the WebView seems to be touchable. However, the problem is that when I touch a form field, the cursor appears but the soft keyboard never shows up! Here's my code in the

Soft Keyboard not displaying on touch in WebView DialogFragment

試著忘記壹切 提交于 2021-02-19 07:07:24
问题 Edit: I have looked at the error page for this; no answers work. It seems it is an Android system bug that has not yet been solved. First off I've referred to this similar question. But the solution to that question does not seem to be the solution to mine. I have a DialogFragment that contains only a WebView . Everything in the WebView seems to be touchable. However, the problem is that when I touch a form field, the cursor appears but the soft keyboard never shows up! Here's my code in the

Passing an Object to Fragment or DialogFragment upon Instantiation

痴心易碎 提交于 2021-02-17 21:36:32
问题 I'm trying to work out the correct way to pass in an Object to a Fragment or DialogFragment without breaking the 'empty constructor' rule. For example I have created a custom View and for each one I instantiate I want to associate a DiaglogFragment. This DialogFragment will be used to display controls with which the user can alter certain aspects of the custom View it is associated with. Because View is an Object I understand I cannot use setArguments(). I could implement a newInstance(View)

Returning to DialogFragment from another Activity reuses my enter animation

时间秒杀一切 提交于 2021-02-09 17:56:08
问题 I have an Activity (A) that creates a DialogFragment. In that DialogFragment, I have a button which creates a new Activity (B). When I finish Activity B, it displays the DialogFragment from Activity A and it reuses that custom animation I set. How do I prevent my DialogFragment from reusing that animation when returning to Activity A? This answer works for some devices, however it freezes the entire window on some (hence the check version) @Override public void onStop() { super.onStop(); if

AndroidRuntimeException: requestFeature() must be called before adding content [duplicate]

你离开我真会死。 提交于 2021-02-07 05:35:13
问题 This question already has answers here : requestFeature() must be called before adding content (8 answers) Closed 6 years ago . 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 onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.interval_time_popup, null); setup(view, false); return view; }

How to set round corners for a custom Dialog?

…衆ロ難τιáo~ 提交于 2021-02-04 06:20:05
问题 This is code for my custom Dialog: public class DialogBrightness extends AppCompatDialogFragment { @NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.layout_dialog, null); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); /*Build and create the dialog here*/ } } I followed instructions from other answers by first creating this drawable xml

How to set round corners for a custom Dialog?

折月煮酒 提交于 2021-02-04 06:16:21
问题 This is code for my custom Dialog: public class DialogBrightness extends AppCompatDialogFragment { @NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.layout_dialog, null); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); /*Build and create the dialog here*/ } } I followed instructions from other answers by first creating this drawable xml

Remove title from DialogFragment

被刻印的时光 ゝ 提交于 2021-01-28 04:13:25
问题 Still I'm notgetting answer from this site.... Time to left this world. I have made a DialogFragment which shows the profile of the user but it has a top title show. When I use getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); then the card that I have shown on the dialog CardView disappears and show the simple detail. When I don't use getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); DialogFragment show like this When use getDialog().getWindow().requestFeature

ArrayAdapter requires the resource ID to be a TextView in DialogFragment

大城市里の小女人 提交于 2021-01-27 13:21:21
问题 I use an ArrayAdapter in a DialogFragment, that work on Android 4.0 and more but not in 2.3. @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); // Get the layout inflater LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.dialog, null); Spinner spReglement; spReglement = (Spinner)view.findViewById(R.id.listReglements); ArrayAdapter<String> adapterList = new

How to raise one DialogFragment above another?

自闭症网瘾萝莉.ら 提交于 2021-01-27 03:52:40
问题 Say I have several dialog fragments that are shown in response to messages and events that can arrive in any order. Normally, the last dialog shown will be on top. Is there a way to show a dialog fragment under an existing one, or change their z-order after they are shown? It should be pretty rare for my app to show more than one dialog at a time, but it could happen. There is one particular dialog that should always be on top whenever it's visible. 回答1: A dialog creates an application sub