Can't use Any, but Types may be different

class AC (element: <Any>){
    var element=element
   var currentLeft: Int = element.x//<--unresoved x WHY
}

var mclass:AC =AC(myelement) //myelement exists and is type Editable but should also work with Button, TextView and all other DOM elements that has x and y coordinates

Any Solutions?

Edit: I guess the problem is somewhere else because

class AC (element: Editable){
    var element=element
   var currentLeft: Int = element.x//<--unresoved x WHY
}

var mclass:AC =AC(myelement) //myelement exists and is type Editable 

won’t work either
x is unresolved but should be 500. Because i wrote myelement.x=500f beforehand

Edit again:
I messed up again. Was EditText. And if i go with that, it works. But as i said, i need something that works for TextViews, Buttons and so on as well. But with “Any”, x stays unresolved

How do you guys handle that?

SOLVED

I did it with two different functions