<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:gravity="center"
    android:orientation="vertical"
    android:padding="10dp">

    <com.example.android.vdmdemo.demos.CounterView
        android:id="@+id/counter"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>