我知道如何将主题应用到整个应用程序,但在那里我会去一个主题应用到只是一个单一的活动?
I know how to apply a theme to a whole application, but where would I go to apply a theme to just a single activity?
您可以将主题通过包括安卓应用到任何活动<活性GT;
里面清单文件
You can apply a theme to any activity by including android:theme
inside <activity>
inside manifest file.
例如:
&LT;活动机器人:主题=@安卓风格/ Theme.Dialog&GT;
&LT;活动机器人:主题=@风格/ CustomTheme&GT;
<activity android:theme="@android:style/Theme.Dialog">
<activity android:theme="@style/CustomTheme">
如果你想设置主题编程,然后使用 setTheme()
之前调用的setContentView()
和 super.onCreate()办法()方法。
And if you want to set theme programatically then use setTheme()
before calling setContentView()
and super.onCreate()
method inside onCreate()
method.
上一篇:任何人有MediaRecorder工作与ParcelFileDescriptor和createPipe()?工作、MediaRecorder、createPipe、ParcelFileDescript
下一篇:Android的FragmentTabHost - 未完全成熟了吗?成熟、Android、FragmentTabHost