Created
November 22, 2013 15:25
-
-
Save dominicthomas/7601669 to your computer and use it in GitHub Desktop.
Simple dialog using a custom layout displayed full screen over the content, with no title or border etc..
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
private Dialog getCustomDialog(String productSpecs) { | |
final Dialog dialog = new Dialog(this, R.style.Dialog); | |
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); | |
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(0)); | |
dialog.setCancelable(true); | |
dialog.setContentView(R.layout.some_layout); | |
// dialog.findViewById stuff here... | |
return dialog; | |
} | |
<style name="Dialog"> | |
<item name="android:windowFrame">@null</item> | |
<item name="android:windowIsFloating">true</item> | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowIsTranslucent">true</item> | |
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> | |
<item name="android:windowBackground">@color/color_dialog_window_background</item> | |
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> | |
<item name="android:colorBackgroundCacheHint">@null</item> | |
<item name="android:backgroundDimEnabled">false</item> | |
</style> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment