我正在使用来自:https ://stackoverflow.com/a/10608622/1261256 的时间选择器类
在偏好屏幕上,除了与上述时间选择器类相关的“时间”之外,我还有几个选项(例如铃声)。
但是,“时间”的文本大于其他首选项的文本。我怎样才能使它统一?
这是 settings.xml:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<CheckBoxPreference
android:defaultValue="true"
android:key="notification" />
<com.xxxx.TimePreference
android:key="notification_time"
android:dependency="notification"
android:title="@string/pref_notification_time" />
<RingtonePreference
android:defaultValue="content://settings/system/notification_sound"
android:dependency="notification"
android:key="notification_ringtone"
android:ringtoneType="notification"
android:title="@string/pref_title_ringtone" />
</PreferenceScreen>
上面的 xml 文件使用以下方法添加:
addPreferencesFromResource(R.xml.settings);