我想知道如何去除或更改Dialog中的titleDivider颜色。这是在蜂巢+设备上显示在对话框标题下方的蓝线。
我猜这是SDK布局的相关部分,但由于没有样式属性,我不知道如何设置样式。如果我尝试使用findViewById,就没有android.R.id.titleDivider。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:fitsSystemWindows="true">
<TextView android:id="@android:id/title" style="?android:attr/windowTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@android:dimen/alert_dialog_title_height"
android:paddingLeft="16dip"
android:paddingRight="16dip"
android:gravity="center_vertical|left" />
<View android:id="@+id/titleDivider"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="@android:color/holo_blue_light" />
<FrameLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:foreground="?android:attr/windowContentOverlay">
<FrameLayout android:id="@android:id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
我尝试重写dialogTitleDecorLayout,只是在我的theme.xml中引用了dialog_title_holo.xml,但没有成功。错误信息如下:
错误:找不到与给定名称匹配的资源:属性“dialogTitleDecorLayout”。