Android 安卓偏好类别
您好,我想在TextView上使用preferencecategory(带下划线等)样式,我应该在xml上实现哪些样式/设置Android 安卓偏好类别,android,android-layout,android-preferences,Android,Android Layout,Android Preferences,您好,我想在TextView上使用preferencecategory(带下划线等)样式,我应该在xml上实现哪些样式/设置 谢谢你你可以做的事情是用android:layout为PreferenceCategory设置自定义布局 <PreferenceCategory android:layout="@layout/prefcat_layout"> ... </PreferenceCategory> ... prefcat_layout.xml: <
谢谢你你可以做的事情是用android:layout为PreferenceCategory设置自定义布局
<PreferenceCategory android:layout="@layout/prefcat_layout">
...
</PreferenceCategory>
...
prefcat_layout.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/underlined_title"/>
</LinearLayout>
strings.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="underlined_title"> <u>Underlined Application preferences title</u></string>
</resources>
带下划线的应用程序首选项标题
我没有使用首选项屏幕,因此我无法使用我使用的是常规的relativelayout。