이 블로그 검색

2011년 4월 26일 화요일

커스텀 뷰 만들시 커스텀어댑터에서 implement 되는 모든 메서드를 정확히 구현해야 한다.

 class CustomerAdapter extends BaseAdapter{
   
     Context maincon;
     LayoutInflater Inflater;
     ArrayList<Customer> vSource;
     int tlayout;
     
     CustomerAdapter(Context context, int targetLayout, ArrayList<Customer> sourceArr)
     {
      Log.i("Gilrs getneration", "서현" );
      maincon = context;
      Inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      vSource = sourceArr;
      tlayout = targetLayout;
     }
   
  @Override
  public int getCount() {
   // TODO Auto-generated method stub
   return  vSource.size();
  }
  @Override
  public Object getItem(int position) {
   // TODO Auto-generated method stub
   return vSource.get(position).cusName;
  }

  @Override
  public long getItemId(int position) {
   // TODO Auto-generated method stub
   return position;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
   // TODO Auto-generated method stub
  
   Log.i("Gilrs getneration", "태연" );
   final int pos = position;
  
   if(convertView == null)
   {
    convertView = Inflater.inflate(tlayout,parent, false);
    Log.i("Gilrs getneration", "윤아" );
   }
  
   TextView txt = (TextView)convertView.findViewById(R.id.listcon);
   txt.setText(vSource.get(position).cusName);
  
   convertView.setOnClickListener(new View.OnClickListener() {
   
    @Override
    public void onClick(View v) {
     // TODO Auto-generated method stub
    
    }
   });
   return convertView;
  }

2011년 4월 14일 목요일

Second topic was so interesting since I've had a lot of interesting about evil of human. This topic was so familiar with me.
Series killer, psychopath, homicide, massacre and raping .... the dark and basic human instinct which is related to violence and cruelty. I don't know since when I began to realize that human beings are basically evil and selfish. From that time I gave up trusting and giving expectation to people. This makes me easy because no expectation brings no disappointment. Even no surprising to me seeing evil like Kim jung-il's  on North Korea.