修改 dialog theme 有兩個步驟
step1:
res/values/新檔名.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="
newStyleName
" parent="@android:style/Theme.Dialog"> <item name="android:background">#FF1234</item> </style> </resources>
step2:
在宣告dialog時,把theme加入。
Dialog newDialog = new Dialog(this,R.style.
newStyleName
);
沒有留言:
張貼留言