在android应用程序中我们可能需要切换模式,如晚上切换到夜间模式便于阅读等.本文参考了网上的一些资料,并结合实例,实现了动态更改主题的效果. Android中实现theme主题可以使用在activity中使用setTheme(int)的方法,SDK中对此方法的说明为: //Set the base theme for this context. Note that this should be called before any views are instantiated in the C…
通过在线安装的方式 Help -> Install New Software Work with: 输入 http://eclipse-color-theme.github.com/update 点击 Add... Select All -> 点击 Next 点击 Finish 由于网络原因,可能需要等待一些时间 点击OK 安装完成之后, 在 Windows -> Preferences -> General -> Appearance 下面会出来一个 Color Theme…