title: In login activity, intent is not working
body: <p>In this activity when both password and username are correct then I have shown a toast and an intent to move to next screen after login, but only toast works, intent is not working? </p>
  
  <pre><code>btnSignIn.setOnClickListener(new View.OnClickListener() {
  
      public void onClick(View v) {
          // get The User name and Password
          String userName = editTextUserName.getText().toString();
          String password = editTextPassword.getText().toString();
  
          // fetch the Password form database for respective user name
          String storedPassword = loginDataBaseAdapter.getSinlgeEntry(userName);
  
          // check if the Stored password matches with Password entered by
          // user
          if (password.equals(storedPassword)) {
              Toast.makeText(HomeActivity.this, "Congrats: Login Successfull",
                      Toast.LENGTH_LONG).show();
              dialog.dismiss();
              Intent intent = new Intent(getApplicationContext(), ViewFolders.class);
              startActivity(intent);
  
          } else {
              Toast.makeText(HomeActivity.this, "User Name or Password does not match",
                      Toast.LENGTH_LONG).show();
          }
      }
  });
  </code></pre>
  
  <p>After login it is not moving to <code>ViewFolders.class</code></p>