List of usage examples for android.app Dialog getWindow
public @Nullable Window getWindow()
From source file:com.ambergleam.android.governmentsalaries.dialog.LicensesDialogFragment.java
@Override public void onStart() { super.onStart(); Dialog dialog = getDialog(); if (dialog != null) { dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); }/*w w w .j a v a2 s . co m*/ }
From source file:net.named_data.nfd.RouteCreateDialogFragment.java
@NonNull @Override// www. java2 s.com public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); builder.setView(inflater.inflate(R.layout.dialog_create_route, null)) .setPositiveButton(R.string.route_add_dialog_create_route, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { EditText prefixBox = (EditText) getDialog().findViewById(R.id.prefix); EditText uriBox = (EditText) getDialog().findViewById(R.id.faceUri); final String prefix = prefixBox.getText().toString(); final String uri = uriBox.getText().toString(); ((OnRouteCreateRequested) getTargetFragment()).createRoute(new Name(prefix), uri); } }).setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { RouteCreateDialogFragment.this.getDialog().cancel(); } }); Dialog faceCreateDialog = builder.create(); faceCreateDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); return faceCreateDialog; }
From source file:eu.thedarken.rootvalidator.ui.AboutDialog.java
@NonNull @Override// w w w.ja v a 2 s.c om public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); setCancelable(true); dialog.setCanceledOnTouchOutside(true); return dialog; }
From source file:ru.yandex.subtitles.ui.fragment.AbstractDialogFragment.java
@NonNull @Override/*from ww w. j a v a2 s . co m*/ public Dialog onCreateDialog(final Bundle savedInstanceState) { final Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().setSoftInputMode(getSoftInputModeFlags()); return dialog; }
From source file:com.synox.android.ui.dialog.SharePasswordDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { mFile = getArguments().getParcelable(ARG_FILE); mCreateShare = getArguments().getBoolean(ARG_CREATE_SHARE, false); // Inflate the layout for the dialog LayoutInflater inflater = getActivity().getLayoutInflater(); View v = inflater.inflate(R.layout.password_dialog, null); // Setup layout EditText inputText = ((EditText) v.findViewById(R.id.share_password)); inputText.setText(""); inputText.requestFocus();//from w w w . jav a 2 s . c om // Build the dialog AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.synox_AlertDialog); builder.setView(v).setPositiveButton(R.string.common_ok, this) .setNegativeButton(R.string.common_cancel, this).setTitle(R.string.share_link_password_title); Dialog d = builder.create(); d.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }
From source file:com.lloydtorres.stately.explore.ExploreDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { LayoutInflater inflater = getActivity().getLayoutInflater(); View dialogView = inflater.inflate(R.layout.fragment_explore_dialog, null); exploreSearch = (AppCompatEditText) dialogView.findViewById(R.id.explore_searchbar); exploreToggleState = (RadioGroup) dialogView.findViewById(R.id.explore_radio_group); DialogInterface.OnClickListener dialogListener = new DialogInterface.OnClickListener() { @Override/*from ww w . j a va 2s .co m*/ public void onClick(DialogInterface dialog, int which) { startExploreActivity(); } }; AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getContext(), RaraHelper.getThemeMaterialDialog(getContext())); dialogBuilder.setTitle(R.string.menu_explore).setView(dialogView) .setPositiveButton(R.string.explore_positive, dialogListener) .setNegativeButton(R.string.explore_negative, null); // Get focus on edit text and open keyboard exploreSearch.requestFocus(); Dialog d = dialogBuilder.create(); d.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }
From source file:com.cerema.cloud2.ui.dialog.SharePasswordDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { mFile = getArguments().getParcelable(ARG_FILE); mCreateShare = getArguments().getBoolean(ARG_CREATE_SHARE, false); // Inflate the layout for the dialog LayoutInflater inflater = getActivity().getLayoutInflater(); View v = inflater.inflate(R.layout.password_dialog, null); // Setup layout EditText inputText = ((EditText) v.findViewById(R.id.share_password)); inputText.setText(""); inputText.requestFocus();/* w ww .j av a 2 s.co m*/ // Build the dialog AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.Theme_ownCloud_Dialog_NoButtonBarStyle); builder.setView(v).setPositiveButton(R.string.common_ok, this) .setNegativeButton(R.string.common_cancel, this).setTitle(R.string.share_link_password_title); Dialog d = builder.create(); d.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }
From source file:com.owncloud.android.ui.dialog.SharePasswordDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { mFile = getArguments().getParcelable(ARG_FILE); mSendIntent = getArguments().getParcelable(ARG_SEND_INTENT); // Inflate the layout for the dialog LayoutInflater inflater = getActivity().getLayoutInflater(); View v = inflater.inflate(R.layout.password_dialog, null); // Setup layout EditText inputText = ((EditText) v.findViewById(R.id.share_password)); inputText.setText(""); inputText.requestFocus();/*www .j av a 2 s. c o m*/ // Build the dialog AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setView(v).setPositiveButton(R.string.common_ok, this) .setNegativeButton(R.string.common_cancel, this).setTitle(R.string.share_link_password_title); Dialog d = builder.create(); d.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }
From source file:org.kaaproject.kaa.demo.notification.fragment.NotificationDialogFragment.java
@NonNull @Override/*from ww w . java 2 s. c om*/ public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); return dialog; }
From source file:com.cerema.cloud2.ui.dialog.CreateFolderDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { mParentFolder = getArguments().getParcelable(ARG_PARENT_FOLDER); // Inflate the layout for the dialog LayoutInflater inflater = getActivity().getLayoutInflater(); View v = inflater.inflate(R.layout.edit_box_dialog, null); // Setup layout EditText inputText = ((EditText) v.findViewById(R.id.user_input)); inputText.setText(""); inputText.requestFocus();/*from w ww . j a va 2s.c om*/ // Build the dialog AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setView(v).setPositiveButton(R.string.common_ok, this) .setNegativeButton(R.string.common_cancel, this).setTitle(R.string.uploader_info_dirname); Dialog d = builder.create(); d.getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }