2013-09-16 4 views
0

확장 가능한 목록 view.but에서 작업 중입니다. "ExpandableListAdapter 유형을 인스턴스화 할 수 없습니다"오류가 발생합니다. 내 코드는 ---확장 목록에 값 표시

public class Calculator_new_Pop extends Dialog implements View.OnClickListener{ 
ExpandableListAdapter listAdapter; 

public Calculator_new_Pop(Activity parent) { 
     // TODO Auto-generated constructor stub 
     super(parent); 
     this._act = parent;} 


protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
       setContentView(R.layout.calculator); 

listAdapter = new ExpandableListAdapter(_act, listDataHeader, listDataChild); 

//  
}} 

어떤 사람이 나를 도울 수 있습니까 ???

답변

0

Chanege이

listAdapter = new ExpandableListAdapter(_act, listDataHeader, listDataChild); 

listAdapter = new ExpandableListAdapter(this); 
listAdapter (_act, listDataHeader, listDataChild); 

또는

listAdapter = new ExpandableListAdapter(ActivityName.this); 
listAdapter (_act, listDataHeader, listDataChild); 

당신이 당신의 코드를 계속하여 _act 초기화 할 경우 _act=new Activity(context);