Android - AttributeSet -
i have code this:
public class cannonview extends surfaceviewimplements surfaceholder.callback{ activity activity;
and constructor:
public cannonview(context context, attributeset attrs){ super(context,attrs) activity = (activity) context;
but apparently attributeset doing nothing, dont know why there, questions are: 1.-what attributeset? 2.-why need provide attributeset attrs second argument? way rest of code painting using canvas. thanks.
http://developer.android.com/training/custom-views/create-view.html - explanation.
shortly, attributeset needed gui editor.
attributeset set of parameters layout_width
, layour_height
, on. need new custom attributes, need extend expand attributset class
Comments
Post a Comment