2017-08-29 5 views
0

materialDialog.dismiss()DialogAdapter(mContext,nListId,(ArrayList<String>)imagelist)の中に呼び出す方法です。そのため、ダイアログボックスはアダプタ経由で終了しますか? DialogadapterにパラメータとしてmaterialDialogを渡そうとしましたが、OnBindViewHolder()materialDialog.dismiss()を呼び出すと、NULLポインタ例外が発生します。 これは、材料ダイアログライブラリーへのリンクです:https://github.com/afollestad/material-dialogsそれは呼び出しているアダプタからマテリアルダイアログ(通販)を解除するにはどうすればいいですか?

materialDialog = new MaterialDialog.Builder(mContext) 
            .title("Choose Node") 
            .adapter(new DialogAdapter(mContext,nListId,(ArrayList<String>)imagelist,materialDialog), null) 
            .positiveText("YES") 
            .negativeText("CANCEL") 
            .build(); 
            .show(); 

答えて

0

あなたはこの質問への答えを提供していません。その目的

+0

のリスナーを使用することができます。十分な[評判](https://stackoverflow.com/help/whats-reputation)があれば、[投稿にコメントする]ことができます(https://stackoverflow.com/help/privileges/comment)。代わりに、[質問者からの明確化を必要としない回答を提供する](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- i-do-代わりに)。 - [レビューの投稿](/レビュー/低品質の投稿/ 17174077) –

関連する問題