我使用此命令更改了AlertDialog标题的颜色
alert.setTitle( Html.fromHtml("<font color='#FF7F27'>Set IP Address</font>"));
Run Code Online (Sandbox Code Playgroud)
但我想改变标题下出现的线条的颜色; 我怎样才能做到这一点 ?
注意:我不想使用自定义布局

在开发Android应用程序时,我已经读过,建议使用DialogFragment而不是直接使用AlertDialog来显示警报和确认.
例如,在DialogFragment的文档中完成此操作:http://developer.android.com/reference/android/app/DialogFragment.html
人们还说他们更喜欢这个: Android DialogFragment vs Dialog
我想知道这种方法的优点,因为代码变得更加复杂.
谢谢
android android-alertdialog android-dialogfragment dialogfragment
我想知道如何在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>
Run Code Online (Sandbox Code Playgroud)
我试图覆盖dialogTitleDecorLayout,它只是对我的theme.xml中的dialog_title_holo.xml的引用,但没有成功.错误是:
错误:错误:找不到与给定名称匹配的资源:attr'contactTitleDecorLayout'.