DialogV3 icon indicating copy to clipboard operation
DialogV3 copied to clipboard

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

Open sfyc23 opened this issue 3 years ago • 1 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

sfyc23 avatar Mar 26 '21 04:03 sfyc23

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

y110231 avatar May 06 '22 08:05 y110231