【发布时间】:2014-10-16 05:26:47
【问题描述】:
在我的应用程序中,我想在运行时通过单击按钮使屏幕变为半透明。 我试过了
setTheme(android.R.style.Theme_Translucent_NoTitleBar);
在onClick() 方法中,但它不起作用。有什么方法可以实现吗?
【问题讨论】:
-
developer.android.com/reference/android/content/…
Note that this should be called before any views are instantiated in the Context (for example before calling setContentView(View) or inflate(int, ViewGroup)).
标签: android android-theme