title: ProgressBar doesn't appear with Coordinator Layout
body: <p>I've an issue with my ProgressBar and I hope you can help me to solve it.</p>
  
  <p>I have layout as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.coordinatorlayout.widget.CoordinatorLayout
      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"
      tools:context=".Edition"&gt;
  
      &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;androidx.appcompat.widget.Toolbar
           ...../&gt;
  
          &lt;ImageView
              android:id="@+id/picEdition"
              android:contentDescription="@null"
              app:layout_constrainedHeight="true"
              app:layout_constrainedWidth="true"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:padding="15dp"
              app:layout_constraintBottom_toTopOf="@+id/editionScroll"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/tool_bar_edition" /&gt;
  
          &lt;ProgressBar
              android:id="@+id/editionProgressBar"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              style="?android:attr/progressBarStyleLarge"
              android:visibility="gone"
              app:layout_constraintBottom_toTopOf="@id/editionScroll"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="@id/tool_bar_edition"/&gt;
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  
      &lt;include layout="@layout/activity_info"/&gt;
  
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>And the part of the java code where I'm trying to call this ProgressBar is:</p>
  
  <pre><code>private ProgressBar editionProgressBar;
  
  protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_edition);
          mContext = this;
  
      editionProgressBar = findViewById(R.id.editionProgressBar);
  
      previewLia.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  editionProgressBar.setVisibility(View.VISIBLE);
                  try {
                      Bitmap confirmLiaBitmap = BitmapFactory.decodeStream(getApplicationContext().openFileInput("editableImage"+i));
                      editImageView.setImageBitmap(doLiaFilter(confirmLiaBitmap));
                      i = i + 1;
                      try {
                          Bitmap finalLiaBitmap = ((BitmapDrawable)editImageView.getDrawable()).getBitmap();
                          ByteArrayOutputStream bytes = new ByteArrayOutputStream();
                          finalLiaBitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes);
                          FileOutputStream fo = openFileOutput("editableImage"+i, Context.MODE_PRIVATE);
                          fo.write(bytes.toByteArray());
                          fo.close();
                      }catch (Exception e){
                          e.printStackTrace();
                      }
  
                  }catch (IOException e){
                      e.printStackTrace();
                  }
                  mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
                  editionProgressBar.setVisibility(View.GONE);
              }
      });
  }
  </code></pre>
  
  <p>But when I click on previewLia the ProgressBar doesn't appear... and it's so frustrating because in another activity where I'm using the same code into a Contraint Layout it's working perfectly.</p>
  
  <p>Any idea where could be the problem?</p>
  
  <p>Thank you in advance!</p>