mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Allow message header to scroll when displaying the attachment list
This commit is contained in:
parent
c1d663b084
commit
7c97527d73
@ -37,6 +37,7 @@
|
|||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/inside_attachments_container"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
@ -54,6 +54,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
|
|||||||
private LinearLayout mHeaderPlaceHolder;
|
private LinearLayout mHeaderPlaceHolder;
|
||||||
private LinearLayout mTitleBarHeaderContainer;
|
private LinearLayout mTitleBarHeaderContainer;
|
||||||
private View mAttachmentsContainer;
|
private View mAttachmentsContainer;
|
||||||
|
private LinearLayout mInsideAttachmentsContainer;
|
||||||
private SavedState mSavedState;
|
private SavedState mSavedState;
|
||||||
|
|
||||||
public void initialize(Activity activity) {
|
public void initialize(Activity activity) {
|
||||||
@ -66,6 +67,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
|
|||||||
mHeaderContainer = (MessageHeader) findViewById(R.id.header_container);
|
mHeaderContainer = (MessageHeader) findViewById(R.id.header_container);
|
||||||
|
|
||||||
mAttachmentsContainer = findViewById(R.id.attachments_container);
|
mAttachmentsContainer = findViewById(R.id.attachments_container);
|
||||||
|
mInsideAttachmentsContainer = (LinearLayout) findViewById(R.id.inside_attachments_container);
|
||||||
mAttachments = (LinearLayout) findViewById(R.id.attachments);
|
mAttachments = (LinearLayout) findViewById(R.id.attachments);
|
||||||
mHiddenAttachments = (LinearLayout) findViewById(R.id.hidden_attachments);
|
mHiddenAttachments = (LinearLayout) findViewById(R.id.hidden_attachments);
|
||||||
mHiddenAttachments.setVisibility(View.GONE);
|
mHiddenAttachments.setVisibility(View.GONE);
|
||||||
@ -463,13 +465,13 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
|
|||||||
private void moveHeaderToLayout() {
|
private void moveHeaderToLayout() {
|
||||||
if (mTitleBarHeaderContainer != null && mTitleBarHeaderContainer.getChildCount() != 0) {
|
if (mTitleBarHeaderContainer != null && mTitleBarHeaderContainer.getChildCount() != 0) {
|
||||||
mTitleBarHeaderContainer.removeView(mHeaderContainer);
|
mTitleBarHeaderContainer.removeView(mHeaderContainer);
|
||||||
mHeaderPlaceHolder.addView(mHeaderContainer);
|
mInsideAttachmentsContainer.addView(mHeaderContainer, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void moveHeaderToWebViewTitleBar() {
|
private void moveHeaderToWebViewTitleBar() {
|
||||||
if (mTitleBarHeaderContainer != null && mTitleBarHeaderContainer.getChildCount() == 0) {
|
if (mTitleBarHeaderContainer != null && mTitleBarHeaderContainer.getChildCount() == 0) {
|
||||||
mHeaderPlaceHolder.removeView(mHeaderContainer);
|
mInsideAttachmentsContainer.removeView(mHeaderContainer);
|
||||||
mTitleBarHeaderContainer.addView(mHeaderContainer);
|
mTitleBarHeaderContainer.addView(mHeaderContainer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user