List of usage examples for android.view Window setLayout
public void setLayout(int width, int height)
From source file:Main.java
public static void maximizeWindow(final Window window) { window.setLayout(FILL_PARENT, FILL_PARENT); }
From source file:com.ui.UiWindow.java
public void setLayout(Window window, int height, int width) { window.setLayout(width, height); }
From source file:com.github.piasy.chatrecyclerview.example.InputDialogFragment.java
@Override public void onStart() { super.onStart(); Window window = getDialog().getWindow(); window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); window.setBackgroundDrawableResource(android.R.color.transparent); final Resources res = getResources(); final int titleDividerId = res.getIdentifier("titleDivider", "id", "android"); if (titleDividerId > 0) { final View titleDivider = getDialog().findViewById(titleDividerId); if (titleDivider != null) { titleDivider.setBackgroundColor(res.getColor(android.R.color.transparent)); }/*www. jav a 2s. co m*/ } }
From source file:com.visenze.visearch.camerademo.fragments.ImageFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Window window = getActivity().getWindow(); window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT); window.setGravity(Gravity.CENTER);/*from w w w.ja v a 2 s .c om*/ setStyle(android.support.v4.app.DialogFragment.STYLE_NO_TITLE, R.style.Theme_TransparentDark); //get parameters url = (String) getArguments().get("url"); }
From source file:com.jooik.tabbeddialog.fragments.FragmentDialog.java
public void onResume() { super.onResume(); Window window = getDialog().getWindow(); window.setLayout(LinearLayoutCompat.LayoutParams.WRAP_CONTENT, getResources().getDimensionPixelSize(R.dimen.dialog_height)); }
From source file:de.grobox.liberario.fragments.HomePickerDialogFragment.java
@Override public void onResume() { // set width to match parent Window window = getDialog().getWindow(); window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); window.setGravity(Gravity.CENTER);//from w ww. j a v a2s. co m super.onResume(); }
From source file:de.grobox.liberario.favorites.trips.SpecialLocationFragment.java
@Override public void onResume() { super.onResume(); getDialog().setCanceledOnTouchOutside(true); // set width to match parent Window window = getDialog().getWindow(); if (window != null) { window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); window.setGravity(Gravity.TOP);/*from w ww . j a va2 s. c o m*/ } InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(loc, InputMethodManager.SHOW_FORCED); }
From source file:fragments.NewTicket.java
@Override public void onResume() { super.onResume(); Window window = getDialog().getWindow(); window.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); window.setGravity(Gravity.CENTER);/*from www . j a v a 2s . c o m*/ }
From source file:com.pyamsoft.dontsuckmp.playback.ShowQueueDialog.java
@Override public void onResume() { super.onResume(); // The dialog is super small for some reason. We have to set the size manually, in onResume final Window window = getDialog().getWindow(); if (window != null) { window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); }/*from w ww . j a v a 2 s . c o m*/ }
From source file:de.grobox.transportr.favorites.locations.SpecialLocationFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getDialog().setCanceledOnTouchOutside(true); // set width to match parent and show keyboard Window window = getDialog().getWindow(); if (window != null) { window.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); window.setGravity(Gravity.TOP);/*w w w. j av a2 s . co m*/ window.setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE); } }