android - How to a add button to view -


i developing game, , have class extended view(not xml file). want add button custom view, extended view has not addview method. how can this?

your class has extend viewgroup, not view.

if want keep class extend view have possibility create object extends viewgroup (for example: linearlayout, relativelayout...). put costum view , button viewgroup.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -