title: Reopen a ScrollView programmatically created with kotlin and closed by Gone
body: <p>I created a scrollView prgrammatically</p>
  <p>extract from .xml file</p>
  <pre><code>&lt;!-- Spinner --&gt;
  &lt;RelativeLayout
      android:id=&quot;@+id/myScrollView&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:layout_marginLeft=&quot;100dp&quot;
      android:layout_marginRight=&quot;100dp&quot;
      app:layout_constraintTop_toBottomOf=&quot;parent&quot;
      android:layout_marginTop=&quot;125dp&quot;
      tools:context=&quot;.QuizActivity&quot;&gt;
  
  &lt;HorizontalScrollView
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:scrollbars=&quot;horizontal&quot;&gt;
  
      &lt;LinearLayout
          android:id=&quot;@+id/linear1&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:orientation=&quot;horizontal&quot;
          android:layout_gravity=&quot;left&quot;
          android:background=&quot;@color/white&quot;
          android:layout_marginTop=&quot;20dp&quot;
          android:layout_marginBottom=&quot;15dp&quot;/&gt;
  &lt;/HorizontalScrollView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p>Here .kt code snippet</p>
  <pre><code>/***************** SCROllL VIEW *****************/
  fun showSpinner(show: Boolean) {
      if (linearLayout == null) {
          linearLayout = findViewById(R.id.linear1)
          if (show) {
              val layoutInflater = LayoutInflater.from(this)
              ...
              ...
          } else {
              // Close de scrollView
              // TODO: fermer le spinner
              if (linearLayout!! != null) {
                  linearLayout!!.visibility = View.GONE
  
              }
  
              // TODO: Add a frame auround the scroll view to get a better look
          }
      }
  }   
  </code></pre>
  <p>But now when I need to recreate it using showSpinner(true) again, it recreate but it does not show at screen !</p>
  <p>I saw in the debugger that the procedure is made but nothing comes on the screen ?</p>
  <p>Any help will be greatly appreciated.
  android</p>