I'd like to center the following LinearLayout
to the center of his parent programatically:
<LinearLayout
android:id="@+id/SignButtonsLinearLayout"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<homes.shared.components.customviews.HomesButton
android:id="@+id/CheckListPDFClosureButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dip"
android:drawableLeft="@drawable/CheckListPDFClosure"
android:background="@drawable/MainBlueButton"
style="@style/WhiteDeliveryNoteMenuBold"
android:text="@string/CheckListPDFClosure" />
<homes.shared.components.customviews.HomesButton
android:id="@+id/SignatureAndCloseButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/SignatureAndClosure"
android:background="@drawable/MainBlueButton"
style="@style/WhiteDeliveryNoteMenuBold"
android:text="@string/SignatureAndClose" />
</LinearLayout>
I have instanced the LinearLayout
in code like this:
LinearLayout ll = this.FindViewById<LinearLayout>(Resource.Id.SignButtonsLinearLayout);
but the object doesn't have LayoutGravity
property