Checks that custom views define the expected constructors

Some layout tools (such as the Android layout editor for Eclipse) needs to find a constructor with one of the following signatures:
* View(Context context)
* View(Context context, AttributeSet attrs)
* View(Context context, AttributeSet attrs, int defStyle)

If your custom view needs to perform initialization which does not apply when used in a layout editor, you can surround the given code with a check to see if View#isInEditMode() is false, since that method will return false at runtime but true within a user interface editor.