The bellow code sample is from a BeeWare suite example. (https://github.com/eliasdorneles/drawingapp-voc/blob/master/drawingapp/app.py)
What does the expression implements=android.view.View[OnClickListener]
means? There should be (a list of) base class(es). Is it some incompatible special syntax of the framework or standard python I can not comprehend (and missing from the documentation)?
Moreover, we are using OnClickListener
here which is never imported. There is no wildcard imports (*) and no module prefix before the symbol like android.Constants.OnClickListener
or someting like that. How can the Python interpreter find the OnClickListener
value in this case?
import android
from android.widget import LinearLayout, TextView, Button
import android.content.Context
from android.graphics import Bitmap, Canvas, Color, Paint, Path, PorterDuff
from android.view import MotionEvent, Gravity
import android.view
class ButtonClick(implements=android.view.View[OnClickListener]):
def __init__(self, callback, *args, **kwargs):
self.callback = callback
'''