android style

在values 目录下新建styles.xml文件,建立自己的style。

 

<</SPAN>resources>
    
<</SPAN>style name="dialog" parent="@android:style/Theme.Dialog">
         
<</SPAN>item name="android:windowFrame">@null</</SPAN>item>
        
<</SPAN>item name="android:windowIsFloating">true</</SPAN>item>
        
<</SPAN>item name="android:windowIsTranslucent">false</</SPAN>item>
        
<</SPAN>item name="android:windowNoTitle">true</</SPAN>item>
        
<</SPAN>item name="android:background">@android:color/black</</SPAN>item>
        
<</SPAN>item name="android:windowBackground">@null</</SPAN>item>
        
<</SPAN>item name="android:backgroundDimEnabled">true</</SPAN>item>
    
</</SPAN>style>

</</SPAN>resources>

 

在AndroidManifest.xml里对需要对话框样式的activity这样处理:

<activity android:name=".NoConnectNotifyActivity" android:theme="@style/dialog"></activity>

posted @ 2014-02-27 14:59  阳光穿透泛白的记忆  阅读(194)  评论(0)    收藏  举报