Skip to content

Instantly share code, notes, and snippets.

@chesnerdesir
Created January 31, 2014 23:14
Show Gist options
  • Select an option

  • Save chesnerdesir/5e204f997a8fc4ec86e6 to your computer and use it in GitHub Desktop.

Select an option

Save chesnerdesir/5e204f997a8fc4ec86e6 to your computer and use it in GitHub Desktop.
Fullscreen Dialog android From http://crintsoft.com/blog/?p=10
Dialog dialog = new Dialog(this, R.style.full_screen_dialog) {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.choose_device_name_dialog);
getWindow().setLayout(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT);
}
};
Create a full screen dialog style in styles.xml
<style name=”full_screen_dialog”>
<item name=”android:windowFrame”>@null</item>
<item name=”android:windowIsFloating”>true</item>
<item name=”android:windowContentOverlay”>@null</item>
<item name=”android:windowAnimationStyle”>@android:style/Animation.Dialog</item>
<item name=”android:windowSoftInputMode”>stateUnspecified|adjustPan</item>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment