2012年10月10日 星期三

[Android] background of android.R.style.Theme_Holo_Light_Dialog

Situation

在 Activity 中設定 android.R.style.Theme_Holo_Light_Dialog

並將此 theme 的背景設為半透明

(Using custom style extends android.R.style.Theme_Holo_Light_Dialog)

開啟畫面時 預設會 focus 在 editText 而跳出 soft keyboard

dialog background 會由半透明變成全黑

But! 相同方式 若是在 AndroidManifest.xml 中設定 theme

即使跳出 soft keyboard 背景也不會變黑?!


Record

soft keyboard is a dialog on window top.

而預設的 soft keyboard dialog style 的背景是黑色的

是否是因為此背景使得 Activity 也轉為黑色背景?


* Reference
- How is the soft keyboard in Android drawn? - Stack Overflow

沒有留言:

張貼留言