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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -