title: SlidingMenu onclickItems(android)
body: <p>I use <a href="https://github.com/jfeinstein10/SlidingMenu/blob/master/example/src/com/jeremyfeinstein/slidingmenu/example/ExampleListActivity.java" rel="nofollow">this</a> library which works fine, but i dont know how to create if i click item 1 in menu output text, if i click item 2 in menu output text 2...</p>
  
  <p>Here is my code :</p>
  
  <pre><code> @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          Log.e("Click", "Click");
          switch (item.getItemId()) {
              case android.R.id.home:
                  menu.toggle(true);
                  return true; 
  
              case R.id.textView1:
                  Log.e("textView1", "textView1");
                  break; 
  
              case R.id.textView2:
                  Log.e("textView2", "textView2");
                  break;
  
              case R.id.textView3:
                  Log.e("textView3", "textView3");
                  break;
  
          default:
              break;
          }
  
          return super.onOptionsItemSelected(item);
      }
  </code></pre>
  
  <p><strong>UPD</strong></p>
  
  <p>menu_flame.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="500dp"
      android:layout_height="wrap_content"
      android:orientation="vertical" 
      android:background="@color/back"&gt;
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="10dp" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
  
              android:src="@drawable/abc_ratingbar_full_material" /&gt;
  
          &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/menu_1"
          android:layout_gravity="center_vertical"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="10dp" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/abc_ratingbar_full_material" /&gt;
  
           &lt;TextView
          android:id="@+id/textView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/menu_2"
          android:layout_gravity="center_vertical"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="10dp" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/abc_ratingbar_full_material" /&gt;
  
      &lt;TextView
          android:id="@+id/textView3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/menu_3"
          android:layout_gravity="center_vertical"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="10dp" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/abc_ratingbar_full_material" /&gt;
  
      &lt;TextView
          android:id="@+id/textView4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/menu_4"
          android:layout_gravity="center_vertical"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>activityMain.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.example.testdesigne.MainActivity" &gt;
  
        &lt;ListView
          android:id="@+id/list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:dividerHeight="1dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Main:</p>
  
  <pre><code>   protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
  
              menu = new SlidingMenu(this);
              menu.setMode(SlidingMenu.LEFT);
              menu.setTouchModeBehind(SlidingMenu.TOUCHMODE_FULLSCREEN);
              menu.setShadowDrawable(R.drawable.slidemenu_shadowgradient);
              menu.setShadowWidth(15);
              menu.setFadeDegree(0.0f);
              menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
              menu.setBehindWidth(300);
              menu.setMenu(R.drawable.menu_frame);
  
              getSupportActionBar().setDisplayShowCustomEnabled(true);
              getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      }
  
  @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          Log.e("Click", "Click");
  
          switch (item.getItemId()) {
  
              case android.R.id.home:
                  Log.e("item",  Integer.toString(item.getItemId()));
                  menu.toggle(true);
                  return true; 
  
              case R.id.textView1:
                  Log.e("textView1", "textView1");
                  break; 
  
              case R.id.textView2:
                  Log.e("textView2", "textView2");
                  break;
  
              case R.id.textView3:
                  Log.e("textView3", "textView3");
                  break;
          }
  
          return super.onOptionsItemSelected(item);
      }
  </code></pre>