2017-12-07 17 views
1

リストビューでカスタムAlertdialogを作成できません。 以下のコードはMainActivityで正しく動作しますが、customAdapter「getLayoutInflater()」の赤で示された:listViewのカスタムalertDialog

android.support.v7.app.AlertDialog.Builder cBuilder = new android.support.v7.app.AlertDialog.Builder(context); 
         View mView = getLayoutInflater().inflate(R.layout.custom_dialog_profil, null); 



         cBuilder.setView(mView); 
         android.support.v7.app.AlertDialog dialog = cBuilder.create(); 
         dialog.show(); 

答えて

1

あなたはgetLayoutInflaterLayoutInflater.from(context)に代わり

を変更することができます
関連する問題