title: how to create ripple effect for pre-lollipop
body: <p>How to apply ripple effect like <a href="https://raw.githubusercontent.com/traex/RippleEffect/master/demo.gif">this</a></p>
  
  <p>i have put the dependencies in app/build.gradle</p>
  
  <p>app/build.gradle</p>
  
  <pre><code>dependencies {
      compile 'com.github.traex.rippleeffect:library:1.3'
  }
  </code></pre>
  
  <p>build.gradle</p>
  
  <pre><code>allprojects{
      repositories{
          jcenter()
          maven(url "https://jitpack.io" }
  </code></pre>
  
  <p>XML file:</p>
  
  <pre><code>&lt;com.andexert.library.RippleView
          android:id="@+id/rect1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
    &lt;Button
        android:id="@+id/enterButton"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Save your user name" /&gt;
   &lt;/com.andexert.library.RippleView&gt;
  </code></pre>
  
  <p>Java class file</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.save_user);
      editText=(EditText) findViewById(R.id.userNameEditText);
      button=(Button) findViewById(R.id.enterButton);
  
      sharedPreferences=getSharedPreferences(SHARED_NAME_STRING, MODE_PRIVATE);
      String userNameString=sharedPreferences.getString(USER_NAME_STRING, "");
  
      editText.setText(userNameString);
  
      button.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              String string=editText.getText().toString();
              Intent intent=new Intent(SaveUser.this, MainActivity.class);
              intent.putExtra("user", string);
  
              SharedPreferences.Editor editor=sharedPreferences.edit();
              editor.putString(USER_NAME_STRING, string);
              editor.commit();
  
              startActivity(intent);
  
          }
      });
  }
  </code></pre>
  
  <p>it works but my problem is another activity opens before the ripple effect completes and when I press back button the remaining ripple completes. how can I solve it??</p>