몇시간째 씨름 하는지 모르겠네요.

아직 adapter 개념도 잘 안잡혔고 getView도 잘 모르고 무작정 해서 그런지 딱 막혀서 진행이 안돼네요 ㅠㅠ

getview 메소드의 if문 안에 currentView = View.inflate(mContext, resId, null);

이부분에서 자꾸 에러나네요.. 도와주세요 고수님들 ㅠㅠ

MyListAdapter.java

public class MyListAdapter extends BaseAdapter {
 private static final String TAG = "MyListAdapter";
// MenuInflater Inflater;
 
 Context mContext;
 int resId;
 ArrayList<MyItem> data;
 MyListAdapter(){}
 
 public MyListAdapter(Context context, int resId, ArrayList<MyItem> data){
  mContext = context;
  this.resId = resId;
  this.data = data;
//  Log.v(TAG,Inflater+"constructor");
 }
 @Override
 public int getCount() {
  // TODO Auto-generated method stub
//  Log.v(TAG,"getCount");
  return data.size();
 }

 @Override
 public Object getItem(int position) {
  // TODO Auto-generated method stub
//  Log.v(TAG,"getItem");
  return data.get(position).getpName();
 }

 @Override
 public long getItemId(int position) {
//  Log.v(TAG,"getItemId");
  // TODO Auto-generated method stub
  return position;
 }

 @Override
 public View getView(final int position, View currentView, ViewGroup root) {
  // TODO Auto-generated method stub
  Log.v(TAG,"position : " + position);  
  
  if(currentView == null){
   
//   Log.v(TAG,Inflater+"");
   Log.v(TAG,resId+"");   
   currentView = View.inflate(mContext, resId, null);
   
   
   //기본적인 작업 실행
  }
  ImageView img = (ImageView)currentView.findViewById(R.id.Img1);
  img.setBackgroundResource(data.get(position).getImgId());
  
  TextView tv = (TextView)currentView.findViewById(R.id.txtname);
  tv.setText(data.get(position).getpName());
  Button btn = (Button)currentView.findViewById(R.id.BtnOrder);
  btn.setOnClickListener(new View.OnClickListener() {
   
   @Override
   public void onClick(View v) {
    Toast.makeText(mContext, data.get(position).getpName(),Toast.LENGTH_LONG).
    show();
    
   }
  });
  
  return currentView;
 }


}

MainActivity .java

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
 MyListAdapter adapter;
 ListView list;
 private static final String TAG = "MainActivity";
 
 LinearLayout[] ll = new LinearLayout[2];
 
 View.OnClickListener bHandler = new View.OnClickListener() {
  
  @Override
  public void onClick(View v) {
   // TODO Auto-generated method stub
   hideLinear();
   switch(v.getId()){
   case R.id.Btn1:
    ll[0].setVisibility(View.VISIBLE);
    break;
   case R.id.Btn2:
    ll[1].setVisibility(View.VISIBLE);
    break;    
   }
   
  }
 };
 
 void hideLinear(){
  for(int i = 0; i < ll.length; i++){
   ll[i].setVisibility(View.INVISIBLE);
   
  }
 }
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        Log.v(TAG,"oncreate");
       
     findViewById(R.id.Btn1).setOnClickListener(bHandler);
     findViewById(R.id.Btn2).setOnClickListener(bHandler);       
        ll[0] = (LinearLayout)findViewById(R.id.ll1);
        ll[1] = (LinearLayout)findViewById(R.id.ll2);
       
        ArrayList<MyItem> data = new ArrayList<MyItem>();
     data.add(new MyItem(R.drawable.pressed,"asdf"));
     data.add(new MyItem(R.drawable.pressed,"gdasfd"));
     data.add(new MyItem(R.drawable.pressed,"fdasfasd"));
     data.add(new MyItem(R.drawable.pressed,"fasd"));
     data.add(new MyItem(R.drawable.pressed,"fdashhh"));
     adapter = new MyListAdapter(this,R.layout.list, data);
     
     list = (ListView)findViewById(R.id.tlist);
     
        list.setAdapter(adapter);
      
 
    }
}