Open QXH313 opened 6 years ago
I have the same issue. Can someone help with this.
I had the same issue, and in my case the problem was that, the library uses a file called dialog_view.xml
so it conflicted with my dialog, which was named the same.
I renamed my file and it worked fine.
...was the file dialog_view.xml, thanks
1.Use in Android is not in kotlin
2. View view = View.inflate(context, R.layout.content, null); return DialogPlus.newDialog(context) .setContentHolder(new ViewHolder(view)) .setGravity(Gravity.TOP) .setContentWidth(ViewGroup.LayoutParams.MATCH_PARENT) .setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT) .setContentBackgroundResource(R.color.transparent) .setOverlayBackgroundResource(R.color.transparent) .setCancelable(true) .setExpanded(false) .create();
3. java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setBackgroundResource(int)' on a null object reference at com.orhanobut.dialogplus.ViewHolder.getView(ViewHolder.java:56) at com.orhanobut.dialogplus.DialogPlus.createView(DialogPlus.java:252) at com.orhanobut.dialogplus.DialogPlus.initContentView(DialogPlus.java:223) at com.orhanobut.dialogplus.DialogPlus.(DialogPlus.java:111)
at com.orhanobut.dialogplus.DialogPlusBuilder.create(DialogPlusBuilder.java:260)