title: Changing height of linearlayout dynamically on drag
body: <p>I'm trying to set height of linearlayout dynamically but i need to call requestlayout always which fliker's the layout.Is any solution for this below is the code for dragging.</p>
  
  <pre><code> moreLoadingPullToRefreshView.setOnDragListener(View.OnDragListener { v, event -&gt;
              val action = event.action
              when (event.action) {
                  DragEvent.ACTION_DRAG_STARTED -&gt;
                      // do nothing
                      Log.d("***started", "started drag")
                  DragEvent.ACTION_DRAG_ENTERED -&gt; {
                      Log.d("***continued", "drag continued")
                      val x_cord = event.x.toInt()
                      val y_cord = event.y.toInt()
                  }
                  DragEvent.ACTION_DRAG_EXITED -&gt; {
                  }
                  DragEvent.ACTION_DROP -&gt; {
                  }
                  DragEvent.ACTION_DRAG_ENDED -&gt; {
                      Log.d("***ended", "drag end")
                      val mCurX = event.x.toInt()
                      val mCurY = event.y.toInt()
                      Log.d("****location stated", "Cur(X, Y) $mCurX, $mCurY")
                  }
                  DragEvent.ACTION_DRAG_LOCATION -&gt; {
                      val mCurX = event.x.toInt()
                      val mCurY = event.y.toInt()
                      val ll:LinearLayout =  findViewById(R.id.loaderView)
                      ll.getLayoutParams().height = mCurY;
                      ll.requestLayout();
                      Log.d("****location stated", "Cur(X, Y) $mCurX, $mCurY")
                  }
                  else -&gt; {
                  }
              }
              true
          })
  </code></pre>