有没有一种方法,我可以让我的应用主题,其用户界面风格,以匹配手机的当前应用的风格?我基本上是在为不同的UI小部件(复选框、微调器、按钮等)寻找样式。
我有一个myTouch 3G幻灯片,它运行的是HTC Sense的浓缩咖啡版本。
更新:(感谢@Macarse的提示)
作为澄清,我试图让我的微调器下拉列表,复选框,按钮等),以遵循目前适用于手机的感觉主题。目前,我做了以下工作,但没有成功:
我创建了一个res/values/styles.xml文件,其中包含以下内容:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme" parent="@android:style/Theme"></style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.division6.pwgenapp"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme">
...
</application>
<uses-sdk android:minSdkVersion="7" />
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.division6.pwgenapp"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme">
...
</application>
<uses-sdk android:minSdkVersion="7" />
</manifest>
如果我用@android:style/Theme.Light,应用程序作为一个整体呈现轻主题。我想弄清楚的是,是否有某种形式的引用允许我引用系统应用的主题。
再次感谢您的评论。
更新:
谢谢大家的收看和评论。