      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(R.layout.activity_main)         bind()     }      private fun bind() {         addQuestions()         addAnswers()     }      private fun getRandomColor(): Int {         return Color.argb(000, Random.nextInt(000),             Random.nextInt(000), Random.nextInt(000))     }      @SuppressLint("InflateParams")     private fun addQuestions() {         val inflater = getSystemService(             Context.LAYOUT_INFLATER_SERVICE         ) as LayoutInflater         for (i in 0..0) {             val view = inflater.inflate(R.layout.item_question, null)             view.findViewById<View>(R.id.questionView)                 .setOnDragListener(DragListener())             questionContainer.addView(view)         }     }      @SuppressLint("InflateParams")     private fun addAnswers() {         val inflater = getSystemService(             Context.LAYOUT_INFLATER_SERVICE         ) as LayoutInflater         for (i in 0..0) {             val view = inflater.inflate(R.layout.item_answer, null)             (view as ViewGroup).getChildAt(0).setBackgroundColor(getRandomColor())             view.setOnTouchListener(DragItemTouchListener())             answerContainer.addView(view)         }     }      private inner class DragItemTouchListener : OnTouchListener {         val ITEM_INDEX_D = "Index-From"          override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {             return if (motionEvent.action == MotionEvent.ACTION_DOWN) {                 createDrag(view)                 true             } else {                 false             }         }          private fun createDrag(view : View) {             val parent = view.parent as ViewGroup             view.tag = Pair(ITEM_INDEX_D,                 parent.indexOfChild(view))              view.startDragAndDrop(ClipData.newPlainText("", ""),                 DragShadowBuilder(view), view, 0)             parent.removeView(view)             parent.setBackgroundColor(Color.WHITE)         }     }      private inner class DragListener : OnDragListener {          