AriesHoo / UIWidget

一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Apache License 2.0
425 stars 74 forks source link

UIAlertDialog 不显现分割线 #19

Closed HuChangyin closed 5 years ago

HuChangyin commented 5 years ago

3.2.7,3.2.8.0...UIAlertDialog IOS风格 ,两个按钮,不显示水平分割线..3.2.6正常

AriesHoo commented 5 years ago

1、是否在同一项目同一设备(手机)测试的效果,只是修改了版本产生的分割线不同 2、分割线默认设置0.5dp可能部分手机会显示不出通过设置dp_line_size 覆盖库里默认值 3、我这所有版本都可正常显示也没有升级去修改过这个默认值

HuChangyin commented 5 years ago

1, 是同一部手机,同一项目

  1. 全是默认值 setDividerWidth(),同样无效 3 .2个按钮不显示水平分割线,3个按钮正常显示
  2. 3.2.7 ,3.2.8同样问题
AriesHoo commented 5 years ago

麻烦提供下,示例代码 。我这 setDividerWidth()是可行的

AriesHoo commented 5 years ago

image

HuChangyin commented 5 years ago

screenshot_20190304-114519

        new UIAlertDialog.DividerIOSBuilder(getActivity())
                .setDividerWidth(20)
                .setMessage("确定" + tvAgainSell.getText().toString() + "?")
                .setNegativeButton("取消", null)
                .setPositiveButton("确定", (dialog, which) -> changeSellStatus())
                .setMinHeight(SizeUtils.dp2px(160))

// .setNeutralButton("测试" ,onAlertClick) // .setNeutralButtonTextColorResource( R.color.colorAlertButton ) .create() // .setDimAmount(0.6f) .show();

HuChangyin commented 5 years ago

是不是,我没有使用androidx的原因?

AriesHoo commented 5 years ago

你直接运行 demo也是一样的问题吗

AriesHoo commented 5 years ago

image

这是用你代码效果

new UIAlertDialog.DividerIOSBuilder(mContext) .setDividerWidth(20) .setMessage("确定?") .setNegativeButton("取消", null) .setPositiveButton("确定", null) .setMinHeight(SizeUtil.dp2px(160)) // .setNeutralButton("测试" ,onAlertClick) // .setNeutralButtonTextColorResource( R.color.colorAlertButton ) .create() // .setDimAmount(0.6f) .show();

AriesHoo commented 5 years ago

你先试一试最新版本 3.2.9在你手机上是否运行正常?实在不行就使用3.2.6