MessageView: scroll to (0,0) on message change.
Bug 2156934.
This commit is contained in:
parent
d493ba257a
commit
1ef86a50f8
@ -21,6 +21,7 @@
|
|||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:background="@android:color/white">
|
android:background="@android:color/white">
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
android:id="@+id/scrollview"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:background="@android:color/white">
|
android:background="@android:color/white">
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
android:id="@+id/scrollview"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -123,6 +123,7 @@ public class MessageView extends Activity implements OnClickListener {
|
|||||||
private View mShowPicturesSection;
|
private View mShowPicturesSection;
|
||||||
private ImageView mSenderPresenceView;
|
private ImageView mSenderPresenceView;
|
||||||
private ProgressDialog mProgressDialog;
|
private ProgressDialog mProgressDialog;
|
||||||
|
private View mScrollView;
|
||||||
|
|
||||||
private long mAccountId;
|
private long mAccountId;
|
||||||
private long mMessageId;
|
private long mMessageId;
|
||||||
@ -332,6 +333,7 @@ public class MessageView extends Activity implements OnClickListener {
|
|||||||
mSenderPresenceView = (ImageView) findViewById(R.id.presence);
|
mSenderPresenceView = (ImageView) findViewById(R.id.presence);
|
||||||
mNext = findViewById(R.id.next);
|
mNext = findViewById(R.id.next);
|
||||||
mPrevious = findViewById(R.id.previous);
|
mPrevious = findViewById(R.id.previous);
|
||||||
|
mScrollView = findViewById(R.id.scrollview);
|
||||||
|
|
||||||
mNext.setOnClickListener(this);
|
mNext.setOnClickListener(this);
|
||||||
mPrevious.setOnClickListener(this);
|
mPrevious.setOnClickListener(this);
|
||||||
@ -770,6 +772,7 @@ public class MessageView extends Activity implements OnClickListener {
|
|||||||
mMessageContentView.scrollTo(0, 0);
|
mMessageContentView.scrollTo(0, 0);
|
||||||
mMessageContentView.loadUrl("file:///android_asset/empty.html");
|
mMessageContentView.loadUrl("file:///android_asset/empty.html");
|
||||||
}
|
}
|
||||||
|
mScrollView.scrollTo(0, 0);
|
||||||
mAttachments.removeAllViews();
|
mAttachments.removeAllViews();
|
||||||
mAttachments.setVisibility(View.GONE);
|
mAttachments.setVisibility(View.GONE);
|
||||||
mAttachmentIcon.setVisibility(View.GONE);
|
mAttachmentIcon.setVisibility(View.GONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user