Code to Display Dialog With no Title bar and Display it on Centre of Screen,Android

In Manifest file use this theme for your Activity:
            android:windowSoftInputMode="stateHidden" >
and style.xml file will look like this:
 <style name="CustomDialogTheme" parent="@android:style/Theme.Dialog">
    <item name="android:windowBackground">@color/transprent</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowNoTitle">true</item>
And no need to do any changes on ur Activity(like adding activity layout to dialog.)
   then u will get the output like this :



Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android