title: android soft keyboard overlays the edittext in recyclerview in bottomsheet
body: <p>I have a few <code>EditText</code> in <code>RecyclerView</code> that is inside of a <code>BottomSheetDialog</code>. The problem I have now is that when <code>BottomSheetDialog</code> is shown on the screen, I tap on for example the 7th  <code>EditText</code> in the <code>RecyclerView</code>. Soft keyboard appears and overlays the <code>EditText</code>, so I can't see what I type. but if I dragged the <code>BottomSheetDialog</code> a bit up, <code>EditText</code> then won't be covered by soft keyboard even if I tap on last <code>EditText</code> on the screen. <code>RecyclerView</code> is definitely resized in this case but doesn't resize if I didn't drag <code>BottonSheetDialog</code> a bit up. any idea why? and how I can fix this?</p>
  
  <p>this is how it looks like. 
  <a href="https://i.stack.imgur.com/hwtkJ.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hwtkJ.gif" alt="enter image description here"></a></p>
  
  <p>Main.java</p>
  
  <pre><code>class VH extends RecyclerView.ViewHolder {
      public VH(View itemView) {
          super(itemView);
      }
  }
  
  private void test() {
      BSTest bsTest = new BSTest(this);
      bsTest.setContentView(R.layout.bottomsheet_test);
      RecyclerView rv = (RecyclerView) bsTest.findViewById(R.id.recyclerView);
      rv.setLayoutManager(new LinearLayoutManager(this));
      rv.setAdapter(new RecyclerView.Adapter() {
          @Override
          public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
              return new VH(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_edittext, parent, false));
          }
  
          @Override
          public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
  
          }
  
          @Override
          public int getItemCount() {
              return 20;
          }
      });
      bsTest.show();
  }
  </code></pre>
  
  <p>BSTest.java</p>
  
  <pre><code>public class BSTest extends BottomSheetDialog {
      public BSTest(@NonNull Context context) {
          super(context);
      }
  
      private BSTest(@NonNull Context context, @StyleRes int theme) {
          super(context, theme);
      }
  
      private BSTest(@NonNull Context context, boolean cancelable, OnCancelListener cancelListener) {
          super(context, cancelable, cancelListener);
      }
  }
  </code></pre>
  
  <p>bottomsheet_test.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="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="1"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="2"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="3"/&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/recyclerView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>item_edittext.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="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="1"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="2"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="3"/&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/recyclerView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>