title: How to add a different icon in slidemenu listview
body: <p>I am using slidemenu example from github and it's showing slide menu only with text and header but I need to add different icon with it. I am trying to use a custom adapter but it's not working...</p>
  
  <p>slidemenu.java:</p>
  
  <pre><code>public class SlideMenu implements SlideMenuAnimationContainer.Listener {
  
      public final static String[] slideMenuOptions = { "Recent Update", "Notification", "Wardrobe" };
      public final static String TAG = "SlideMenu";
      protected static final String TextView = null;
      Intent intent;
  
      private Context context;
      private SlideMenuAnimationContainer slideMenuAnimationContainer;
  
      public SlideMenu( Context context, SlideMenuAnimationContainer mainAnimationLayout){
  
          this.context = context;
          this.slideMenuAnimationContainer = mainAnimationLayout;
      }
  
      public void init(){
  
          final Activity activity = (Activity) context;
  
          //Set Content's show menu button's action
          ImageView showMenuButton = (ImageView) activity.findViewById( R.id.content_button);
          showMenuButton.setOnClickListener( new OnClickListener(){
  
              @Override
              public void onClick( View v){
  
                  slideMenuAnimationContainer.toggleSlideMenu();
              }
          });
  
  
          //Contruct the SlideMenu items here, you can replace this ArrayAdapter with your customr ArrayAdapter
          List&lt;SlideMenuItem&gt; slideMenuList = new ArrayList&lt;SlideMenuItem&gt;();
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Header, "Updates"));
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Activity, "Recent Update"));
      //  slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Header, "Header 2"));
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Activity, "Notification"));
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Header, "Category"));
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Activity, "Wardrobe"));
          slideMenuList.add( new SlideMenuItem( SlideMenuItemType.Activity, "Gadgets"));
  
          SlideMenuArrayAdapter slideMenuArrayAdaptar = new SlideMenuArrayAdapter( context, android.R.layout.simple_list_item_1, slideMenuList);
  
          ListView menuListView = (ListView) activity.findViewById( R.id.slideMenuListView);
          menuListView.setAdapter( slideMenuArrayAdaptar);
          menuListView.setOnItemClickListener( new OnItemClickListener(){
  
              @Override
              public void onItemClick( AdapterView&lt;?&gt; parent, View view, int position, long id){
  
                  // Close sidebar
                  slideMenuAnimationContainer.closeSlideMenuAndActOnClick( parent, view, position, id);
              }
          });
  
          //Implement your logic here within the execute() function when an item is clicked with in the SlideMenu
          //Called after the SlideMenu collapses.
          slideMenuAnimationContainer.setMenuItemSelectedAction( new MenuItemSelectedAction(){
  
              @Override
              public void execute( AdapterView&lt;?&gt; parent, View view, int position, long id){
  
                  //Only act when a ListViewItem with type Activity is clicked
                  TextView textView = (TextView)view.findViewById( R.id.MenuActivityListViewItem_text);
                  if( textView != null &amp;&amp; textView.getId() == R.id.MenuActivityListViewItem_text){
  
                      //Start new activity
                      CharSequence selectedActivityName = textView.getText();
  
  
                      if( selectedActivityName.equals( "Recent Update")) {
                          intent = new Intent( activity, Activity1.class);
                      }
                      else if( selectedActivityName.equals( "Notification")) {
                          intent = new Intent( activity, Activity2.class);
                      }
                      else if( selectedActivityName.equals( "Wardrobe")) {
                          intent = new Intent( activity, Activity3.class);
                      }
                      else if( selectedActivityName.equals( "Gadgets")) {
                          intent = new Intent( activity, Gadgets_Activity.class);
                      }
                       intent =intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                      activity.startActivity( intent);
                  }
              }
          });
      }
  
      //Callback of SlideMenuAnimationContainer.Listener to monitor status of SlideMenu
      @Override
      public void onSlideMenuOpened(){
          Log.d( TAG, "opened");
      }
  
      //Callback of SlideMenuAnimationContainer.Listener to monitor status of SlideMenu
      @Override
      public void onSlideMenuClosed(){
          Log.d( TAG, "closed");
      }
  
      //Callback of SlideMenuAnimationContainer.Listener to monitor status of SlideMenu
      @Override
      public boolean onContentTouchedWhenOpening(){
          //The content area is touched when sidebar opening, close sidebar
          Log.d( TAG, "going to close sidebar");
          slideMenuAnimationContainer.closeSlideMenu();
          return true;
      }
  }
  </code></pre>
  
  <p>and Adapter:</p>
  
  <pre><code>public class SlideMenuArrayAdapter extends ArrayAdapter&lt;SlideMenuItem&gt; {
  
      private List&lt;SlideMenuItem&gt; slideMenuItemList;
  
      public SlideMenuArrayAdapter( Context context, int textViewResourceId, List&lt;SlideMenuItem&gt; slideMenuItemList) {
  
          super( context, textViewResourceId, slideMenuItemList);
          this.slideMenuItemList = slideMenuItemList;            
      }
  
      @Override
      public View getView( int position, View view, ViewGroup parent) {
  
          SlideMenuItem slideMenuItem = slideMenuItemList.get( position);
          LayoutInflater layoutInflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          if( slideMenuItem.getSlideMenuItemType() == SlideMenuItemType.Header){
  
              view = layoutInflater.inflate( R.layout.menu_header_listview_item, null);          
  
              TextView textView = (TextView) view.findViewById( R.id.MenuListHeaderListViewItem_text);           
              textView.setText( slideMenuItem.getText());
  
          }
          else if( slideMenuItem.getSlideMenuItemType() == SlideMenuItemType.Activity){
              view = layoutInflater.inflate( R.layout.menu_activity_listview_item, null);            
  
              TextView textView = (TextView) view.findViewById( R.id.MenuActivityListViewItem_text);                  
              textView.setText( slideMenuItem.getText());
          }
          else{
              view = null;    //Left for operation 
          }
  
          return view;
      }    
  }
  </code></pre>