1
2
3
4
5
6
7
8
|
< style name = "simple_dialog" parent = "@android:style/Theme.Dialog" > < item name = "android:windowFrame" >@null</ item > <!--
Dialog的WindowFrame框爲無 --> < item name = "android:windowNoTitle" >true</ item > < item name = "android:windowIsFloating" >true</ item > <!--
是否懸浮在activity上 --> < item name = "android:windowIsTranslucent" >true</ item > <!--
是否半透明 --> < item name = "android:backgroundDimEnabled" >false</ item > <!--
背景是否模糊 --> </ style > |
1
|
<application
android:theme= "@style/CustomTheme" > |
1
|
<activity
android:theme= "@android:style/Theme.Dialog" > |
1
2
3
4
5
6
|
< TextView android:layout_width = "fill_parent" android:layout_height = "wrap_content" android:textColor = "#00FF00" android:typeface = "monospace" android:text = "@string/hello" /> |
1
2
3
|
<TextView style= "@style/CodeFont" android:text= "@string/hello" /> |
1
2
3
4
5
6
7
8
9
|
<? xml version = "1.0" encoding = "utf-8" ?> < resources > < style name = "CodeFont" parent = "@android:style/TextAppearance.Medium" > < item name = "android:layout_width" >fill_parent</ item > < item name = "android:layout_height" >wrap_content</ item > < item name = "android:textColor" >#00FF00</ item > < item name = "android:typeface" >monospace</ item > </ style > </ resources > |