kongzue / DialogV3

🔥空祖家的对话框工具V3版,集成三种风格+夜间模式对话框,以及等待、提示、分享等特色对话框,支持花式自定义

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

当使用 iOS 风格中,当无标题时显示有点难看。

sfyc23 opened this issue · comments

当我使用

   MessageDialog.show(me, null, "这是一条消息", "确定");

弹出无标题对话框时,如图。

image

如果使用:

MessageDialog.show(me, "", "这是一条消息", "确定");

弹出标题为空白的对话框时,内容与顶部的空白又太多。

image

主要原因应该是在这里:
dialog_select_ios.xml 文件中:

 <TextView
                android:id="@+id/txt_dialog_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="20dp"
                android:gravity="center"
                android:text="标题"
                android:textColor="@color/black"
                android:textSize="17dp"
                android:textStyle="bold" />

使用了 android:layout_marginTop="20dp"
如果在父元素控件 LinearLayout 中用 android:paddingTop="20dp" 替换就好看多了。
如图:
image

同样遇到 可以使用标题参数为null 内容前面用个换行符\n 样式好一些