Created
January 31, 2014 23:14
-
-
Save chesnerdesir/5e204f997a8fc4ec86e6 to your computer and use it in GitHub Desktop.
Fullscreen Dialog android From http://crintsoft.com/blog/?p=10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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