Activity 以 Dialog 形式存在:
只要在AndroidManifest.xml中設(shè)置該Activity屬性為:
android:theme="@android:style/Theme.Dialog"
達到的效果就像google自帶的搜索widiget中,點擊錄音鍵彈出的對話框效果一樣 除了一個dialog,沒有其他的東西,而且背景是半透明的。

android自帶theme如下:
android:theme="@android:style/Theme.Dialog" 將一個Activity顯示為對話框模式 android:theme="@android:style/Theme.NoTitleBar" 不顯示應(yīng)用程序標(biāo)題欄 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不顯示應(yīng)用程序標(biāo)題欄,并全屏 android:theme="Theme.Light" 背景為白色 android:theme="Theme.Light.NoTitleBar" 白色背景并無標(biāo)題欄 android:theme="Theme.Light.NoTitleBar.Fullscreen" 白色背景,無標(biāo)題欄,全屏 android:theme="Theme.Black" 背景黑色 android:theme="Theme.Black.NoTitleBar" 黑色背景并無標(biāo)題欄 android:theme="Theme.Black.NoTitleBar.Fullscreen" 黑色背景,無標(biāo)題欄,全屏 android:theme="Theme.Wallpaper" 用系統(tǒng)桌面為應(yīng)用程序背景 android:theme="Theme.Wallpaper.NoTitleBar" 用系統(tǒng)桌面為應(yīng)用程序背景,且無標(biāo)題欄 android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" 用系統(tǒng)桌面為應(yīng)用程序背景,無標(biāo)題欄,全屏 android:theme="Translucent" android:theme="Theme.Translucent.NoTitleBar" android:theme="Theme.Translucent.NoTitleBar.Fullscreen" android:theme="Theme.Panel" android:theme="Theme.Light.Panel"
|