title: Android startActivity not working
body: <p>I'm having small problem with my app. <code>startActivity(Intent intent)</code> is not working.</p>
  
  <pre><code>    switch (id) {
          case R.id.action_add:
              if (auth.getCurrentUser() != null) {
                  if (vf.getDisplayedChild() &gt; 0 &amp;&amp; vf.getDisplayedChild() &lt; 3) {
                      Intent intent = new Intent(MainActivity.this, SubmitActivity.class);
                      intent.putExtra("category", vf.getDisplayedChild());
                      startActivity(intent);
                      Toast.makeText(this, "You are about to create record", Toast.LENGTH_SHORT).show();
                  }
              }
              break;
          case R.id.action_save:
              saveList("monuments", monument_data);
              saveList("ski_resorts", ski_data);
              Toast.makeText(this, "Data saved for offline use", Toast.LENGTH_SHORT).show();
              break;
      }
  </code></pre>
  
  <p>Actually, someone should simply tell that statement's condition wasn't meeted but in fact, toast after <code>startActivity</code> is shown so statement is correct. I have intent also in recyclerview's adapter on <code>framelayout</code> is clicked but here intent doesn't work also.</p>
  
  <p>I could also mention that I have intent with shared object animation(not the same intent).</p>
  
  <p>Anyone knows what is wrong? Intent in switch statement(shown above) worked until I added intent into recyclerview, Please help.</p>
  
  <p>EditActivity:</p>
  
  <pre><code>public class EditActivity extends AppCompatActivity {
  
  FirebaseAuth auth;
  DatabaseReference ref, target;
  StorageReference storage;
  
  ProgressDialog dialog;
  
  @BindView(R.id.imageView8)
  ImageView main_image;
  @BindView(R.id.input_title)
  EditText title;
  @BindView(R.id.input_desc)
  EditText desc;
  @BindView(R.id.input_location)
  EditText location;
  @BindView(R.id.switch1)
  Switch isPublic;
  @BindView(R.id.switch2)
  Switch isFree;
  @BindView(R.id.input_price)
  EditText price;
  @BindView(R.id.button3)
  Button send;
  
  public static final int PICK_IMAGE = 1;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_edit);
      ButterKnife.bind(this); . . . }}
  </code></pre>
  
  <p>SubmitActivity:</p>
  
  <pre><code>public class SubmitActivity extends AppCompatActivity {
  
  FirebaseAuth auth;
  DatabaseReference ref, target;
  StorageReference storage;
  
  ProgressDialog dialog;
  
  @BindView(R.id.imageView8)
  ImageView main_image;
  @BindView(R.id.input_title)
  EditText title;
  @BindView(R.id.input_desc)
  EditText desc;
  @BindView(R.id.input_location)
  EditText location;
  @BindView(R.id.switch1)
  Switch isPublic;
  @BindView(R.id.switch2)
  Switch isFree;
  @BindView(R.id.input_price)
  EditText price;
  @BindView(R.id.button3)
  Button send;
  
  public static final int PICK_IMAGE = 1;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_submit);
      ButterKnife.bind(this); . . . }}
  </code></pre>
  
  <p>This part filtered with "intent" appear when option is selected:</p>
  
  <blockquote>
    <p>01-11 18:37:13.918 22224-22239/? I/ActivityManager: START u0 {flg=0x8000 cmp=com.ready.slovakia/.SubmitActivity (has extras)} from uid 10883 on display 0
     01-11 18:37:14.122 22224-22251/? I/WindowManager: Gaining focus: Window{8f13679 u0 com.ready.slovakia/com.ready.slovakia.MainActivity}</p>
  </blockquote>