1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Remove duplication between versions of the message view

This commit is contained in:
Jesse Vincent 2010-12-13 00:18:04 +00:00
parent 26712ed84a
commit 749072c4e7
7 changed files with 282 additions and 322 deletions

View File

@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.fsck.k9.view.ToggleScrollView
android:id="@+id/top_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:scrollbarStyle="outsideInset"
android:foregroundGravity="fill"
android:fillViewport="true"
android:fadingEdge="none">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<include layout="@layout/message_view_header" />
<View
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<LinearLayout
android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/archive_scrolling"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="57dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:padding="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply_scrolling"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/delete_scrolling"
android:text="@string/delete_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward_scrolling"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next_scrolling"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:padding="0dip"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</com.fsck.k9.view.ToggleScrollView>
<LinearLayout
android:id="@+id/move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/archive"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="57dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:padding="0dip"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/delete"
android:text="@string/delete_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="57dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:padding="0dip"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/delete"
android:text="@string/delete_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
</merge>

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/archive_scrolling"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="57dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:padding="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply_scrolling"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/delete_scrolling"
android:text="@string/delete_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward_scrolling"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next_scrolling"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:padding="0dip"
android:layout_weight="1" />
</LinearLayout>
</merge>

View File

@ -25,153 +25,9 @@
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<LinearLayout
android:id="@+id/extra_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/reply"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply_all"
android:text="@string/reply_all_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/archive_scrolling"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<ImageButton
android:id="@+id/delete_scrolling"
android:layout_height="wrap_content"
android:src="@drawable/ic_button_delete"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next_scrolling"
android:padding="0dip"
android:text="@string/message_view_next_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<include layout="@layout/message_view_scrolling_buttons"/>
</LinearLayout>
</com.fsck.k9.view.ToggleScrollView>
<LinearLayout
android:id="@+id/move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/archive"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<ImageButton
android:id="@+id/delete"
android:layout_height="wrap_content"
android:src="@drawable/ic_button_delete"
android:textSize="0dip"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<include layout="@layout/message_view_move_buttons"/>
<include layout="@layout/message_view_bottom_buttons"/>
</LinearLayout>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<ImageButton
android:id="@+id/delete"
android:layout_height="wrap_content"
android:src="@drawable/ic_button_delete"
android:textSize="0dip"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next"
android:text="@string/message_view_next_action"
android:contentDescription="@string/next_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
</merge>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/archive"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
</merge>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/extra_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/reply"
android:text="@string/reply_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/reply_all"
android:text="@string/reply_all_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/forward"
android:text="@string/forward_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/archive_scrolling"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:contentDescription="@string/previous_action"
android:textSize="35dip"
android:padding="0dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<ImageButton
android:id="@+id/delete_scrolling"
android:layout_height="wrap_content"
android:src="@drawable/ic_button_delete"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/next_scrolling"
android:padding="0dip"
android:text="@string/message_view_next_action"
android:textSize="35dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
</merge>