Having your view displayed in the layout view in Eclipse is not direct. From what I saw (it is not exhaustive at all), using a fully custom View / Surface View with rendering placed in the separete stream does not work.
But if you create a custom view based on an existing one (for example, inheriting from EditTExt) and only overriding the onDraw method, the layout manager will display your view as planned. Parameters inherited from Android View (here EditText) will apply to your custom view. Custom options will not have effects (I think).
source share