Styles. xml style:
Style. xml Code
<Style name = "FullScreenDialog" parent = "android: style/Theme. Dialog">
<Item name = "android: windowNoTitle"> true </item>
<Item name = "android: windowFrame"> @ null </item>
<Item name = "android: incluwisfloating"> true </item>
<Item name = "android: javaswistranslucent"> false </item>
<Item name = "android: background"> @ android: color/black </item>
<Item name = "android: windowBackground"> @ null </item>
<Item name = "android: backgroundDimEnabled"> false </item>
</Style>
Use the upper interface class of AlertDialog:
Java code
Dialog reNameDialog = new Dialog (getContext (), R. style. FullScreenDialog );
LayoutInflater mLayoutInflater = (LayoutInflater) getContext (). getSystemService (Context. LAYOUT_INFLATER_SERVICE );
View reNameView = mLayoutInflater. inflate (R. layout. audiorecord_rename, null );
LayoutParams params = new LayoutParams (LayoutParams. WRAP_CONTENT, LayoutParams. WRAP_CONTENT );
ReNameDialog. addContentView (reNameView, params );
ReNameDialog. show ();