public surfaceviewclass (Context context, AttributeSet attrs) {
super(context, attrs);
}
Edit:
This is the constructor that is called when the view is inflated (constructed) from the xml. The attributes you declared are supplied by the second parameter