am 8b003de7: am 1ef86a50: MessageView: scroll to (0,0) on message change.

Merge commit '8b003de7adc059d87da3268b9e3a06bc68eabada' into eclair-mr2-plus-aosp

* commit '8b003de7adc059d87da3268b9e3a06bc68eabada':
  MessageView: scroll to (0,0) on message change.
This commit is contained in:
Mihai Preda 2009-10-06 07:58:55 -07:00 committed by Android Git Automerger
commit 17d0710277
3 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@
android:layout_height="fill_parent"
android:background="@android:color/white">
<ScrollView
android:id="@+id/scrollview"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"

View File

@ -21,6 +21,7 @@
android:layout_height="fill_parent"
android:background="@android:color/white">
<ScrollView
android:id="@+id/scrollview"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"

View File

@ -123,6 +123,7 @@ public class MessageView extends Activity implements OnClickListener {
private View mShowPicturesSection;
private ImageView mSenderPresenceView;
private ProgressDialog mProgressDialog;
private View mScrollView;
private long mAccountId;
private long mMessageId;
@ -332,6 +333,7 @@ public class MessageView extends Activity implements OnClickListener {
mSenderPresenceView = (ImageView) findViewById(R.id.presence);
mNext = findViewById(R.id.next);
mPrevious = findViewById(R.id.previous);
mScrollView = findViewById(R.id.scrollview);
mNext.setOnClickListener(this);
mPrevious.setOnClickListener(this);
@ -770,6 +772,7 @@ public class MessageView extends Activity implements OnClickListener {
mMessageContentView.scrollTo(0, 0);
mMessageContentView.loadUrl("file:///android_asset/empty.html");
}
mScrollView.scrollTo(0, 0);
mAttachments.removeAllViews();
mAttachments.setVisibility(View.GONE);
mAttachmentIcon.setVisibility(View.GONE);