As type parameters are actually cleared off in bytecode, you can use in XML the class name as if it was not parametrized and then cast it to proper parametrized type in java code.
consider having class:
public class CustomViewFlipper<T extends View> extends ViewFlipper {
//...
and in your activities layout xml:
<view
class="com.some.package.CustomViewFlipper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/customFlipper"/>
then in your activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
//...
@SuppressWarnings("unchecked")
CustomViewFlipper<TextView> customFlipper =
(CustomViewFlipper<TextView>) findViewById(R.id.customFlipper);