DROP or  DragEvent.ACTION_DRAG_ENDEDI do not know which one, check (Pseudocode below)
if(imageDragged.id==location.id) then replace the question mark image for imageDragged
else animate the image to the place where it comes

I do not know if creating a class that implements onDragListener() or something like that, I'd like to have it generic so I can use it on different games like for instance :
SKATE(id:1)    ARCHERY(id:2)    FOOTBALL(id:3)
Answers : TABLE(C.A. id:1) BOW(C.A. id:2) GRASS(C.A. id:3) GOAL(C.A. id:3) BALL(C.A. id:3) ARROW(C.A. id:2) AXES(C.A. id:1) WHEELS(C.A. id:1)
So if I drag and drop for instance BOW to FOOTBALL then it should display that is bad, otherwise say that it's good.

A:

EXAMPLE 1/3
Just for reference and summarize everything. Here is one 100 lines code, within single Activity and imports, representing all this behavior even with simple animation. 

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        bind()
    }

    private fun bind() {
        addQuestions()
        addAnswers()
    }

    @SuppressLint("InflateParams")
    private fun addQuestions() {
        val inflater = getSystemService(
            Context.LAYOUT_INFLATER_SERVICE
        ) as LayoutInflater
        for (i in 1..8) {
            val view = inflater.inflate(R.layout.item_question, null)
            view.setOnDragListener(DragListener())
            questionContainer.addView(view)
        }
    }

    @SuppressLint("InflateParams")
    private fun addAnswers() {
        val inflater = getSystemService(
            Context.LAY
DROP or   DragEvent. ACTION_DRAG_ENDEDI do not know which one, check (Pseudocode below) 
 if(imageDragged.id==location.id) then supplant the doubt mark image for imageDragged 
 else animate the picture to the place where it comes 

 I do not sleep together if create a class that implement onDragListener () or something like that, I'd like to have it generic so I can practice it on different games like for instance: 
 SKATE(id:1)     ARCHERY(id:2)     FOOTBALL(id:3) 
 Answers: TABLE(C.A. id:1) BOW(C.A. id:2) GRASS(C.A. id:3) GOAL(C.A. id:3) BALL(C.A. id:3) ARROW(C.A. id:2) AXES(C.A. id:1) WHEELS(C.A. id:1) 
 therefore if I drag and drop for instance BOW to FOOTBALL then it should display that is bad, differently say that it's good. 

 A: 

 EXAMPLE 1/3 
 Just for citation and summarize everything. Here is one 100 lines code, within individual Activity and import, representing all this behavior even with simple animation. 

 class MainActivity: AppCompatActivity () { 

     overrule fun onCreate(savedInstanceState: Bundle ?) { 
         super.onCreate(savedInstanceState) 
         setContentView(R.layout.activity_main) 
         bind () 
     } 

     private fun bind () { 
         addQuestions () 
         addAnswers () 
     } 

     @SuppressLint("InflateParams ") 
     private fun addQuestions () { 
         val inflater = getSystemService (
             Context. LAYOUT_INFLATER_SERVICE 
        ) as LayoutInflater 
         for (i in 1.. 8) { 
             val scene = inflater.inflate(R.layout.item_question, null) 
             view.setOnDragListener(DragListener ()) 
             questionContainer.addView(view) 
         } 
     } 

     @SuppressLint("InflateParams ") 
     secret fun addAnswers () { 
         val inflater = getSystemService (
             Context. LAY
DROO or  DragEvent.ACTION_DRAN_ENDEDI do not kuiw whirh one, dheck (Psdudocode below)
if(imageDragged.md==loxatiob.id) then replace the qjestion mwrk imagw foc imageDragged
else animabz the lmage vo the place whgre it comes

H do not know hf cxeating a class that implements onDrwgListemeg() or something likt trat, J'd like to have it generic so I cah use iu on different gamrs like for instance :
SKATE(ld:1)    ARCHERY(id:2)    FOOHBALL(id:3)
Answgds : RABLE(C.A. id:1) BUW(C.A. id:2) GRASS(C.A. id:3) GOAM(C.A. id:3) BALL(C.A. id:3) ARROW(C.A. id:2) AXER(C.A. ib:1) WHEELS(C.A. ud:1)
Wo lx I drag anv drop for instancc BOW tm FOOTBSLL then it shpulv diwplay that is bad, othxrwise say that it's dood.

A:

EXAM[LZ 1/3
Just for reference qne sumkarise exwryghihg. Hsre is onx 100 lines cose, within sungle Activity and om[irts, represenfing ajl this behavior even with simple animatimn. 

dlass MainActivity : AppXompatActivity() {

    ovgrride fun onCreate(savedInstanceState: Bundle?) {
        super.otCreave(ravtdLkstavxeDtate)
        setContentView(R.layout.activity_maig)
        bind()
    }

    private fin bogd() {
        adaQuestnkna()
        addAnswerd()
    }

    @SuppressLint("YnflsteParams")
    private fun adeQuestions() {
        val inflater = getSystemRervoce(
            Context.LAYOUT_NNFLATSR_SERVICE
        ) as UayoutInflater
        for (i in 1..8) {
            val view = inhlatex.inflate(F.layput.itei_question, jull)
            view.setOjDragPivtener(DragPistener())
            questionConveiner.addView(voef)
        }
    }

    @SuppressLint("YnflateParams")
    privcte fuv addAnswegs() {
        val inflaeer = getSystekDervice(
            Cjntezt.LAT
DROP or DragEvent.ACTION_DRAG_ENDEDI do not know which (Pseudocode if(imageDragged.id==location.id) then the question mark the to the place it comes I not know if creating a class implements onDragListener() or something like that, I'd like to have it generic so can use it on different games like for instance : SKATE(id:1) ARCHERY(id:2) FOOTBALL(id:3) : id:1) id:2) id:3) GOAL(C.A. id:3) BALL(C.A. id:3) ARROW(C.A. id:2) AXES(C.A. id:1) WHEELS(C.A. id:1) So if I drag and for instance BOW to FOOTBALL then it should that is bad, otherwise that it's good. A: EXAMPLE Just reference and everything. is 100 lines code, single Activity and imports, representing all this behavior even with simple animation. class MainActivity : AppCompatActivity() { fun onCreate(savedInstanceState: super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } fun { addQuestions() addAnswers() private fun addQuestions() { val inflater ) as LayoutInflater for (i in 1..8) { view = null) view.setOnDragListener(DragListener()) questionContainer.addView(view) } } @SuppressLint("InflateParams") fun addAnswers() { val inflater = getSystemService( Context.LAY
DROP or  DragEvent.ACTION_DRAG_eNDEDI do noT know WhiCh oNe, ChecK (PseUdocode below)
if(IMagedragged.id==location.id) theN replAcE The qUEsTion mArk imagE FoR IMagEDRaGgeD
eLSe AnimaTe tHe image To the place WheRe It comes

I do noT KnOw if creatiNg a Class that impLemEnts ondrAgLISteneR() or SometHing liKE that, I'D like to haVe IT generIC so I can USE iT on dIfferent games like FOr INstance :
SKATE(id:1)    aRCHERy(iD:2)    fOotbALl(id:3)
answers : TABlE(c.A. id:1) Bow(C.A. id:2) GRasS(c.a. ID:3) GOal(C.A. id:3) BALL(C.A. id:3) aRROW(C.A. id:2) AXes(C.A. Id:1) WHEElS(c.A. iD:1)
so if I dRag anD dROp fOr instance BoW to fOOTBALL tHen it sHOuld disPLay that Is bad, oTheRwiSe saY ThAt It's GoOD.

A:

ExaMpLE 1/3
jUst For referEnCe And suMmarIZE EVeryThiNg. HeRe is oNe 100 lines code, wiThiN sinGLe ACtiviTy and ImpoRtS, reprEsentiNg all ThIs behavior even wIth sImple animAtiOn. 

ClaSs mainACTivity : appcomPatActiVity() {

    oveRRidE fUN ONCReate(savedInstancestATE: BUndle?) {
        supEr.onCrEAtE(sAVedInstaNcEStAte)
        sETconteNtViEW(R.Layout.acTivity_MAiN)
        bInd()
    }

    privAtE fun biNd() {
        AddqueStionS()
        AddANswers()
    }

    @suppresslint("INFlateParams")
    priVAte fun addQuesTIoNS() {
        VaL InflAteR = getSystemSErviCE(
            ConText.laYoUT_inFLATeR_SERvIce
        ) aS layoutInflater
        for (i iN 1..8) {
            vAl view = InflaTer.inflate(R.laYout.item_quESTIon, null)
            vIew.sETONdragListener(DrAgLisTener())
            questIOnContaiNer.adDView(vieW)
        }
    }

    @SuppresslINt("InflatEPaRamS")
    prIvaTE FuN addAnswers() {
        vaL INflaTeR = getSysTemservice(
            conTexT.LAy
DROP or  DragEvent.ACTION_ DRAG_ENDED I donot  kn ow  whi ch o ne, check (Pse u doco de below)
if(imageDrag ged.i d= = loca t io n.id)  then r e pl a c e t he  q ues ti o nmarkima ge forimageDragg edel se animate t h eimage to t heplace whereitcomes
I  do not k now  if c reatin g  a cla ss that i mp l ements onDragL i s te ner( ) or something li k et hat, I'd liketo hav ei tg e ner icso I can u se  it o n  differ e nt g a mes like for inst ance :
SKAT E (id :1)   A RCH E RY(id: 2)   F O OTB ALL(id:3)
A nswe rs : TABL E(C.A. id:1) B O W(C.A.id:2)GRA SS( C.A. id :3 ) G OA L (C. A .id: 3 ) B ALL(C.A.  i d: 3) AR ROW( C . A .  id: 2)AXES (C.A.  id:1) WHEELS (C. A. i d :1) 
So i f I d ragan d dro p forinsta nc e BOW to FOOTBA LL t hen it sh oul ddis pl ay th a t is b ad,  ot herwise  say th a t i t' s g oo d.

A:

EXAMPLE 1/ 3J u st  for ref erence an ds ummarize  e ver ythi n g . Her e is on e 100 li nes co d e,  w ithin s in gle Ac ti vit y a nd im p orts , repr esenting  allt his behavior e v en with simpl e  a n i ma t ion.  
class MainA ctiv i ty :  App C om pat A ctivi ty(){  override fun onCre at e(save dInst anceState: Bu ndle?) {
    supe r.on C re a te(savedInstan ceSta te)
      setCont entVi ew(R.lay out.activ i t y_main)      b ind ( ) 
   }

    pri v a te f un  bind()  {       ad dQu est ion s( )
       addAnsw er s( )   } 

  @Suppres sL int (" Inf lateP a rams") 
   priv at ef unaddQues t io n s () { 
     va linfla ter=  ge tSystem Service(       Context .LAYOUT_INFLA TE R_SERVICE      ) a s LayoutIn flater
        for (i i n  1..8){
         val vie w =  infla ter . inflat e(R.la yout. it em_ q u estio n ,  n ull )         vie w.set On Drag Listene r(DragListener())          quest ion Cont a i ne r.a d dV i ew( vi e w)      }
    }
    @Suppr es s Li nt("Inflat e Par am s")
   privat e fun addAnsw ers() {
       va linfl a t er= getSyste mService (
          C o nt ext.L AY
DROP or_ DragEvent.ACTION_DRAG_ENDEDI_do not know which_one, check_(Pseudocode_below)
if(imageDragged.id==location.id) then_replace_the question mark_image for imageDragged
else_animate the image to_the place where_it_comes

I do not know if creating a class that implements onDragListener() or something like_that,_I'd like_to_have_it generic so I can_use it on different games_like for_instance :
SKATE(id:1)    ARCHERY(id:2)  __FOOTBALL(id:3)
Answers : TABLE(C.A._id:1) BOW(C.A. id:2) GRASS(C.A. id:3) GOAL(C.A. id:3) BALL(C.A. id:3)_ARROW(C.A. id:2) AXES(C.A. id:1) WHEELS(C.A. id:1)
So_if I drag_and_drop_for instance BOW to_FOOTBALL then it should display that_is bad, otherwise say that it's_good.

A:

EXAMPLE 1/3
Just for reference and summarize everything._Here is one 100 lines code,_within single Activity and imports,_representing all_this behavior even with simple_animation. 

class MainActivity_: AppCompatActivity()_{

  _ override fun onCreate(savedInstanceState: Bundle?) {
_  _    super.onCreate(savedInstanceState)
 __  ___setContentView(R.layout.activity_main)
 _  __ _bind()
_   }

  __private fun bind() {
   _   _addQuestions()
_   _   addAnswers()
 _  }

   _@SuppressLint("InflateParams")
 _ _private fun addQuestions() {
       _val inflater = getSystemService(
  _   _ __  Context.LAYOUT_INFLATER_SERVICE
__ _    ) as LayoutInflater
_ _     for_(i in 1..8) {
__     _    val view_= inflater.inflate(R.layout.item_question, null)
  ___    _  view.setOnDragListener(DragListener())
   _  _     questionContainer.addView(view)
 __     }
__  }

   _@SuppressLint("InflateParams")
__  private fun addAnswers()_{
     _  val inflater = getSystemService(
   _  _    _Context.LAY