title: Software keyboard removes Views
body: <p>i couldnt find anything in google about my problem:</p>
  
  <p>When the software keyboard opens after clicking on an EditText, underlying Views SOMETIMES get invisible/disappear. It happens only every couple clicks and mostly when i open an AlertDialog while the Keyboard is opened (even though i close the keyboard programmatically before opening the Dialog).</p>
  
  <p>If i click anything else, like an EditText (it doesnt necessarily have to change the views) they reappear.</p>
  
  <p>clipChildren is set to false.</p>
  
  <p>How can i solve this?</p>
  
  <p><strong>Edit: I just realized i had a useless LinearLayout as the ParentView of my ScrollLayout. Ignore that</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@color/colorBackground"
  android:clickable="true"
  android:fitsSystemWindows="true"
  android:orientation="vertical"&gt;
  
  
  
  &lt;ScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorBackground"
          android:clipChildren="false"
          android:orientation="vertical"
          android:padding="@dimen/activity_vertical_margin"
  
  
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:layout_marginTop="16dp"
              android:gravity="center_vertical"
              android:text="@string/icon"
              android:textSize="@dimen/text_size_medium"
              app:layout_constraintBottom_toBottomOf="@+id/task_icon"
              app:layout_constraintTop_toBottomOf="@+id/edit_text_task_name"
              app:layout_constraintVertical_bias="0.0"
              app:layout_constraintStart_toStartOf="parent" /&gt;
  
          &lt;EditText
              android:id="@+id/edit_text_task_name"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:hint="@string/edit_name"
              android:imeOptions="actionDone"
              android:inputType="text"
              android:maxLines="1"
              android:textColor="@android:color/white"
              android:textColorHint="@android:color/white"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;ImageView
              android:id="@+id/task_icon"
              android:layout_width="48dp"
              android:layout_height="48dp"
              android:layout_marginStart="16dp"
              android:layout_marginTop="16dp"
              android:contentDescription="@string/icon"
              app:layout_constraintStart_toEndOf="@+id/textView2"
              app:layout_constraintTop_toBottomOf="@+id/edit_text_task_name"
              app:srcCompat="@drawable/ic_clock_white" /&gt;
  
          &lt;android.support.v7.widget.AppCompatSpinner
              android:id="@+id/task_icon_spinner"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              app:backgroundTint="@android:color/white"
              app:layout_constraintBottom_toBottomOf="@+id/task_icon"
              app:layout_constraintStart_toEndOf="@+id/task_icon"
              app:layout_constraintTop_toTopOf="@+id/task_icon" /&gt;
  
          &lt;TextView
              android:id="@+id/textView3"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
  
              android:layout_marginTop="16dp"
              android:gravity="center_vertical"
              android:text="@string/type"
              android:textSize="@dimen/text_size_medium"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/textView2" /&gt;
  
          &lt;RadioGroup
              android:id="@+id/radioGroup"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginStart="16dp"
              app:layout_constraintStart_toEndOf="@+id/textView3"
              app:layout_constraintTop_toTopOf="@+id/textView3"&gt;
  
              &lt;android.support.v7.widget.AppCompatRadioButton
                  android:id="@+id/fixed_time_button"
                  android:layout_width="wrap_content"
                  android:layout_height="48dp"
                  android:checked="true"
                  android:text="@string/fixed_time"
                  android:textColor="@android:color/white" /&gt;
  
              &lt;android.support.v7.widget.AppCompatRadioButton
                  android:id="@+id/before_bed_button"
                  android:layout_width="wrap_content"
                  android:layout_height="48dp"
                  android:layout_weight="1"
                  android:text="@string/before_bed"
  
                  android:textColor="@android:color/white" /&gt;
  
              &lt;android.support.v7.widget.AppCompatRadioButton
                  android:id="@+id/time_passed_button"
                  android:layout_width="wrap_content"
                  android:layout_height="48dp"
                  android:layout_weight="1"
                  android:text="@string/time_passed"
  
                  android:textColor="@android:color/white" /&gt;
          &lt;/RadioGroup&gt;
  
          &lt;TextView
              android:id="@+id/textView4"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
              android:layout_marginTop="16dp"
              android:gravity="center_vertical"
              android:text="@string/due"
              android:textSize="@dimen/text_size_medium"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/radioGroup"
              /&gt;
  
          &lt;ImageView
              android:id="@+id/time_picker_image"
              android:layout_width="24dp"
              android:layout_height="48dp"
              android:layout_marginStart="16dp"
              app:layout_constraintBottom_toBottomOf="@+id/textView4"
              app:layout_constraintStart_toEndOf="@+id/textView4"
              app:layout_constraintTop_toTopOf="@+id/textView4"
              app:layout_constraintVertical_bias="0.0"
              app:srcCompat="@drawable/ic_clock_white"
              tools:ignore="ContentDescription" /&gt;
  
          &lt;TextView
              android:id="@+id/time_picker_text"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
              android:gravity="center_vertical"
              android:paddingStart="4dp"
              app:layout_constraintBottom_toBottomOf="@+id/time_picker_image"
              app:layout_constraintStart_toEndOf="@+id/time_picker_image"
              app:layout_constraintTop_toTopOf="@+id/time_picker_image"
              tools:text="at exactly 20:00"
              tools:ignore="RtlSymmetry" /&gt;
  
          &lt;android.support.v7.widget.AppCompatSpinner
              android:id="@+id/time_picker_spinner"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
  
              app:backgroundTint="@android:color/white"
              app:layout_constraintBottom_toBottomOf="@+id/time_picker_text"
              app:layout_constraintStart_toEndOf="@+id/time_picker_text"
              app:layout_constraintTop_toTopOf="@+id/time_picker_text" /&gt;
  
          &lt;TextView
              android:id="@+id/sleep_time_explanation"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:drawablePadding="4dp"
              android:text="@string/sleep_time_settings_explanation"
              android:textColor="@color/yellow"
              android:visibility="gone"
              app:layout_constraintStart_toStartOf="@+id/textView4"
              app:layout_constraintTop_toBottomOf="@+id/time_picker_text"
              tools:drawableStart="@drawable/ic_lightbulb_yellow_small"
              tools:visibility="visible" /&gt;
  
          &lt;TextView
              android:id="@+id/textView5"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
              android:layout_marginTop="16dp"
              android:gravity="center_vertical"
              android:text="@string/reminder"
              android:textSize="@dimen/text_size_medium"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/sleep_time_explanation" /&gt;
  
          &lt;RadioGroup
              android:id="@+id/radioGroup2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginStart="16dp"
              android:layout_marginTop="0dp"
              app:layout_constraintStart_toEndOf="@+id/textView5"
              app:layout_constraintTop_toTopOf="@+id/textView5"&gt;
  
              &lt;android.support.v7.widget.AppCompatRadioButton
                  android:id="@+id/no_reminder_button"
                  android:layout_width="wrap_content"
                  android:layout_height="48dp"
                  android:layout_weight="1"
                  android:checked="true"
                  android:text="@string/no_reminder"
                  android:textColor="@android:color/white" /&gt;
  
              &lt;android.support.v7.widget.AppCompatRadioButton
                  android:id="@+id/remind_me_button"
                  android:layout_width="wrap_content"
                  android:layout_height="48dp"
                  android:layout_weight="1"
                  android:text="@string/remind_me"
                  android:textColor="@android:color/white" /&gt;
  
          &lt;/RadioGroup&gt;
  
          &lt;ImageView
              android:id="@+id/reminder_picker_image"
              android:layout_width="48dp"
              android:layout_height="48dp"
              android:layout_weight="1"
              android:padding="12dp"
              android:visibility="gone"
              app:layout_constraintStart_toStartOf="@+id/radioGroup2"
              app:layout_constraintTop_toBottomOf="@+id/radioGroup2"
              app:srcCompat="@drawable/ic_bell_white"
              tools:ignore="ContentDescription"
              tools:visibility="visible" /&gt;
  
          &lt;TextView
              android:id="@+id/reminder_picker_text"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
              android:layout_weight="1"
              android:gravity="center_vertical"
              android:visibility="gone"
              app:layout_constraintBottom_toBottomOf="@+id/reminder_picker_image"
              app:layout_constraintStart_toEndOf="@+id/reminder_picker_image"
              app:layout_constraintTop_toTopOf="@+id/reminder_picker_image"
              tools:text="1:00h before"
              tools:visibility="visible" /&gt;
  
          &lt;android.support.v7.widget.AppCompatSpinner
              android:id="@+id/reminder_picker_spinner"
              android:layout_width="wrap_content"
              android:layout_height="48dp"
              android:visibility="gone"
              app:backgroundTint="@android:color/white"
              app:layout_constraintBottom_toBottomOf="@+id/reminder_picker_text"
              app:layout_constraintStart_toEndOf="@+id/reminder_picker_text"
              app:layout_constraintTop_toTopOf="@+id/reminder_picker_text"
              tools:visibility="visible" /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>