Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义对View出不出 #21

Open
Jay-YaoJie opened this issue Nov 9, 2018 · 5 comments
Open

自定义对View出不出 #21

Jay-YaoJie opened this issue Nov 9, 2018 · 5 comments

Comments

@Jay-YaoJie
Copy link

image

@Jay-YaoJie
Copy link
Author

设置了没有显示

@Jay-YaoJie
Copy link
Author

//初始化布局:
View customView = LayoutInflater.from(me).inflate(R.layout.layout_custom, null);
//启动对话框
MessageDialog.build(context, null, null, "知道了", new DialogInterface.OnClickLis
@OverRide
public void onClick(DialogInterface dialog, int which) {

}

}).setCustomView(customView)
.setCanCancel(true)
.showDialog();

出不来呀,我的style
image

@Jay-YaoJie
Copy link
Author

image

@kongzue
Copy link
Owner

kongzue commented Nov 9, 2018

目前尚不清楚原因,您可以尝试下Demo中的代码
https://github.com/kongzue/Dialog/blob/master/app/src/main/java/com/kongzue/dialogdemo/MainActivity.java)
目前我这边测试自定义布局是能够正常显示的

@Jay-YaoJie
Copy link
Author

Jay-YaoJie commented Nov 15, 2018

如果自定义的View 一定要写成RelativeLayout开头的布局,写成了LinearLayout是不可以的,因为在加载库里add是RelativeLayout
image

但是现在修改了,,,键盘弹不出来了
https://blog.csdn.net/zxyyohou/article/details/80338222
或着修改为
https://blog.csdn.net/zxyyohou/article/details/80338222
SelectDialog类下面修改,,其他的我还没有调试过,,,
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants