title: Multiple activity on one button click
body: <p>I have a problem with creating 2 activities for 1 button. I created a button and I managed to connect that button with one activity but I dont know how to add another activity to the same button.. What am I trying to do is that when we press on that button it will start playing animation (I managed to do that) but I also want it to send SMS to a specific number. I have code for that, but I dont know how to include / connect everything together. </p>
  
  <p>Code from a button: </p>
  
  <pre><code>&lt;Button
      android:id="@+id/button"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/transparent" /&gt;
  </code></pre>
  
  <p>Code from a imageview (animation):</p>
  
  <pre><code>&lt;ImageView
  
      android:id="@+id/imageView"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_centerHorizontal="true"
      android:layout_centerVertical="true"
      android:layout_gravity="center"
      android:scaleType="centerInside"
      android:src="@drawable/keers" /&gt;
  </code></pre>
  
  <p>Code from main activity, for animation: </p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.activity_main);
  
      imageView = (ImageView) findViewById(R.id.imageView);
  
      button = (Button) findViewById(R.id.button);
  
      running = false;
  
      button.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View view) {
              if(!running){
              ((AnimationDrawable) imageView.getDrawable()).start();
              running = true;}
          }
      }
      );
  }
  }
  </code></pre>
  
  <p>Now what I want to add for the same button is this :</p>
  
  <pre><code>public void sendText(View paramView)
  {
      Toast.makeText(this, "SENT",Toast.LENGTH_SHORT).show();
      SmsManager.getDefault().sendTextMessage("+3564245237",null,"1", null, null);
  </code></pre>
  
  <p>I'm not that experienced in programming, so it might be pretty easy for you guys. </p>