Make the message view scrollable on tablets.
Bug: 5178810 Change-Id: I75b0c12456cb590f02088c38df65527405d026bf
This commit is contained in:
parent
8b54f09c7b
commit
a43437e96a
@ -28,83 +28,64 @@
|
||||
android:layout_gravity="center"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
/>
|
||||
<RelativeLayout
|
||||
<ScrollView
|
||||
android:id="@+id/main_panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<!-- Subject -->
|
||||
<TextView
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="48dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="0dip"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:gravity="center_vertical"
|
||||
style="@style/message_view_subject"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/subject_divider"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:layout_below="@id/subject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
<!-- Upper header. Outer container needed only since the relative layout
|
||||
params can't be passed in an include tag.-->
|
||||
<FrameLayout
|
||||
android:id="@+id/message_view_header_upper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:layout_below="@id/subject_divider"
|
||||
>
|
||||
<include layout="@layout/message_view_header_upper" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Addresses, timestamp -->
|
||||
<FrameLayout
|
||||
android:id="@+id/message_view_subheader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:layout_below="@id/message_view_header_upper"
|
||||
>
|
||||
<include layout="@layout/message_view_subheader" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/address_divider"
|
||||
android:layout_width="0dip"
|
||||
android:layout_below="@id/message_view_subheader"
|
||||
android:layout_alignLeft="@id/message_view_header_upper"
|
||||
android:layout_alignRight="@id/message_view_header_upper"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
<!--
|
||||
The rest: tab + body + command buttons. Use LinearLayout to easily hide part of
|
||||
them.
|
||||
-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="0dip"
|
||||
android:layout_below="@id/address_divider"
|
||||
android:layout_alignLeft="@id/message_view_header_upper"
|
||||
android:layout_alignRight="@id/message_view_header_upper"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<!-- Subject -->
|
||||
<TextView
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dip"
|
||||
android:gravity="center_vertical"
|
||||
style="@style/message_view_subject"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/subject_divider"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
<!-- Upper header. Outer container needed only since the relative layout
|
||||
params can't be passed in an include tag.-->
|
||||
<FrameLayout
|
||||
android:id="@+id/message_view_header_upper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<include layout="@layout/message_view_header_upper" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Addresses, timestamp -->
|
||||
<FrameLayout
|
||||
android:id="@+id/message_view_subheader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
>
|
||||
<include layout="@layout/message_view_subheader" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/address_divider"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
<!-- The rest: tab + body + command buttons. -->
|
||||
<!-- Tabs + divider -->
|
||||
<!-- Can't use a RelativeLayout, because tabs can be GONE -->
|
||||
<LinearLayout
|
||||
android:id="@+id/message_tabs_section"
|
||||
android:layout_width="match_parent"
|
||||
@ -211,40 +192,33 @@
|
||||
|
||||
<!-- content area - only one of them is visible at a time -->
|
||||
<!-- Message body -->
|
||||
<WebView
|
||||
<com.android.email.view.RigidWebView
|
||||
android:id="@+id/message_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<!-- TODO: get rid of these useless _scroll elements now that
|
||||
they're no longer needed -->
|
||||
<!-- Invite: Even though this section is only for MessageViewFragment,
|
||||
Its visibility is controlled by MessageViewFragmentBase for simplicity.
|
||||
MessageFileViewFragment shouldn't touch this. -->
|
||||
<ScrollView
|
||||
<FrameLayout
|
||||
android:id="@+id/invite_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<include layout="@layout/message_view_invitation" />
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Attachments -->
|
||||
<ScrollView
|
||||
<FrameLayout
|
||||
android:id="@+id/attachments_scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<LinearLayout
|
||||
@ -256,7 +230,7 @@
|
||||
android:divider="?android:attr/dividerHorizontal"
|
||||
android:showDividers="beginning|middle|end"
|
||||
/>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user