title: android: ListActivity , custom adapter
body: <p>I am trying to create custom adapter for list activity to show different images for each action. I am getting following error.</p>
  
  <pre><code>Error: The method getView(int, View, ViewGroup) of type 
  ClientOperations.MyCustomAdapter must override or implement a supertype method
  </code></pre>
  
  <p>Can someone please help me.</p>
  
  <pre><code>public class ClientOperations extends ListActivity {
  
      public class MyCustomAdapter extends ArrayAdapter&lt;String&gt; {
  
          public MyCustomAdapter(Context context, int textViewResourceId, String[] objects) {
          super(context, textViewResourceId, objects);
          // TODO Auto-generated constructor stub
          }
  
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
          // TODO Auto-generated method stub
  
          LayoutInflater inflater=getLayoutInflater();
          View row=inflater.inflate(R.layout.clientoperations, parent, false);
          TextView op=(TextView)row.findViewById(R.id.operation);
          op.setText(operation[position]);
          ImageView icon=(ImageView)row.findViewById(R.id.icon);
  
          if (operation[position] == "Share"){
              icon.setImageResource(R.drawable.filesharing);
          } else if(operation[position] == "Remove"){
              icon.setImageResource(R.drawable.remove);
          } else if(operation[position] == "Exit"){
              icon.setImageResource(R.drawable.logout);
          } else {
              icon.setImageResource(R.drawable.viewshare);
          }
  
          return row;
          }
      }
  
      String username = null;
      String[] operation = new String[] { "Share", "Servershare", "Usershare", "Myshare",
              "Remove", "Exit"};
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          //setContentView(R.layout.clientoperations);
  
          Bundle extras = getIntent().getExtras();
          if(extras !=null)
          {
              username = extras.getString("username");
          }         
  
          // Use your own layout and point the adapter to the UI elements which
          // contains the label
          this.setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.clientoperations,
                  R.id.operation, operation));
      }
  
      @Override
      protected void onListItemClick(ListView l, View v, int position, long id) {
          super.onListItemClick(l, v, position, id);
          // Get the item that was clicked
          Object o = this.getListAdapter().getItem(position);
          String keyword = o.toString();
          Toast.makeText(this, "You selected: " + keyword, Toast.LENGTH_LONG)
                  .show();
  
      }   
  }
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"&gt;
      &lt;ImageView android:id="@+id/icon" 
      android:layout_height="wrap_content"
      android:src="@drawable/icon" 
      android:layout_width="22px"
      android:layout_marginTop="10px" 
      android:layout_marginRight="7px"
      android:layout_marginLeft="7px"&gt;
      &lt;/ImageView&gt;
      &lt;TextView android:text="@+id/TextView01" 
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textSize="25dp"
      android:textStyle="bold"
      android:typeface="sans" 
      android:id="@+id/operation"
      android:layout_marginTop="10px"&gt;    
      &lt;/TextView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>