안녕하세요.
alertdialog로 checkbox를 띄우려고 하고 있습니다.
adapter를 이용해서 띄우기 까지는 했는데요...
자꾸 체크를 하면 dialog가 꺼져 버리네요...
안 꺼지게 하는 방법이 없을 까요.. ㅜㅜ
소스 첨부 합니다.
도와주세요....
ListAdapter adapter = new ArrayAdapter<Item>(
this,
android.R.layout.select_dialog_item,
android.R.id.text1,
items){
public View getView(int position, View convertView, ViewGroup parent) {
//User super class to create the View
View v = super.getView(position, convertView, parent);
TextView tv = (TextView)v.findViewById(android.R.id.text1);
//Put the image on the TextView
tv.setCompoundDrawablesWithIntrinsicBounds(items[position].icon, 0, 0, 0);
//Add margin between image and text (support various screen densities)
int dp5 = (int) (5 * getResources().getDisplayMetrics().density + 0.5f);
tv.setCompoundDrawablePadding(dp5);
return v;
}
};
AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this);
helpBuilder.setTitle("Share Appliction");
helpBuilder.setCancelable(true);
helpBuilder.setPositiveButton("Ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Do nothing but close the dialog
}
});
helpBuilder.setAdapter(adapter, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
}
}).create().show();




답변은 아랫분께서;;