2017-12-07 26 views
1

listview에서 사용자 정의 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)에 대신

을 변경할 수 있습니다