你的位置:首页 > 软件开发 > 操作系统 > Android对话框自定义标题

Android对话框自定义标题

发布时间:2016-02-07 20:00:05
Android自带的对话框标题不好看,如果我们需要给弹出的对话框设置一个自己定义的标题,可以使用AlertDialog.Builder的setCustomTitle()方法。定义一个对话框标题的title.<??><LinearLayout ="htt ...

Android对话框自定义标题

Android自带的对话框标题不好看,如果我们需要给弹出的对话框设置一个自己定义的标题,可以使用AlertDialog.Builder的setCustomTitle()方法。

定义一个对话框标题的title.

<??><LinearLayout ="http://schemas.android.com/apk/res/android"  android:layout_width="fill_parent"  android:layout_height="wrap_content"  android:background="@color/white"  android:gravity="center_vertical"  android:orientation="vertical" >    <LinearLayout    android:id="@+id/patient_top"    android:layout_width="match_parent"    android:layout_height="50dp"    android:layout_alignParentTop="true"    android:background="@color/green"    android:gravity="center_vertical|center_horizontal"    android:orientation="vertical" >    <TextView      android:id="@+id/txtPatient"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:text="选择城市"      android:textColor="@color/white"      android:textSize="20sp" />      </LinearLayout></LinearLayout>

原标题:Android对话框自定义标题

关键词:Android

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录