I have this Layout
:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutSign"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="1000dp"
android:minHeight="1000dp"
android:padding="2dp">
<LinearLayout
android:orientation="horizontal"
android:minWidth="25px"
android:minHeight="25px"
android:weightSum="100"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linearLayout8"
android:layout_weight="1">
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/layoutSignaturePad"
android:background="#FF0055"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="80"
android:padding="10dp">
<SignaturePad.SignaturePadView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/signaturePad" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:layout_weight="20"
android:layout_width="0dp"
android:layout_height="match_parent"
android:id="@+id/linearLayout14"
android:weightSum="100"
android:background="#00FFFF">
<TextView
android:text="Text"
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/textSignInfoTemp"
android:layout_weight="0" />
<Button
android:text="Button"
android:id="@+id/button1"
android:rotation="90"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="50" />
<Button
android:text="Button"
android:id="@+id/button1"
android:rotation="90"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="50" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
It creates this View
:
Now I would like to rotate the Signature Pad by setting the rotation to 90 but it causes this View
where the Width
and Height
are not changed on the SignaturePad (The gray line on the first picture is not visible on the second image).
I have tried to change the rotation on the Layout
, the SignaturePad
and both without getting the expected result.
All screens on my application is in Portrait mode and this View
is being popped in a DialogFragment
and I would like to give the illusion of it being in Landscape
mode without changing the Orientation
in the Activity
or creating a new Activity
just for this screen.
Question: How can I rotate the SignaturePad
and have it fill its parent Layout
?