나는 우리가 정의 나열 할 것은 내가 레이아웃 인플레이터에 의해안드로이드 - 사용자 정의
어떤 도움을 주시면 감사하겠습니다 사용자 지정 목록을 만들 수있는 기본 활동을 원하는
2.2 이후
안드로이드 얼마나 확실하지 않다 나열합니다! 하나를 선택하기 위해이 사용자에 대한 라디오 버튼이있는 대화 상자가 표시됩니다/* create the dialog */
final AlertDialog.Builder dlg = new AlertDialog.Builder(this);
/* create the list of items to show on listbox */
String [] myList = {"A","B","C","D","E"};
/* create an adapter to control how the listbox should appear */
final ArrayAdapter<String> adapter = new ArrayAdapter<String>
(this,android.R.layout.select_dialog_singlechoice,myList);
/* the item that will be initially selected on listbox */
int selected = 0;
/* inform the dialog about our items and create an onClick function to listen for
user inputs */
dlg.setSingleChoiceItems(adapter,selected,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// selected item is myList[which];
dialog.dismiss();
}
});
/* change the dialog title */
dlg.setTitle("My dialog");
/* show the dialog */
dlg.show();
이 여기에, 목록 대화 상자를 표시하는 방법에 대한 예를 들어 당신이 원하는, 그래서 경우
"맞춤 목록 만들기", 네? 케어가 확장됩니까? –
맞춤 목록이란 무엇입니까? 사용자 지정 목록보기 또는 사용자 지정 어댑터를 만들어 목록보기를 표시하려고합니까? 당신은 당신의 필요가 무엇인지 정교 할 수 있습니까? – AD14
사용자 정의 listview, 요소를 추가 할 수 있습니까? 아니면 u는 어댑터를 의미합니까? plese specify ... – subrussn90