cleanung up the scroll fix a little

This commit is contained in:
iNPUTmice 2014-10-06 22:03:01 +02:00
parent 315731b0cf
commit b6f5e4a217
4 changed files with 10 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0.1dp" android:layout_height="0dp"
android:background="#00000000"> android:background="#00000000">
</RelativeLayout> </RelativeLayout>

View File

@ -670,7 +670,7 @@ public class ConversationActivity extends XmppActivity implements
@Override @Override
public void onSaveInstanceState(Bundle savedInstanceState) { public void onSaveInstanceState(Bundle savedInstanceState) {
Conversation conversation = getSelectedConversation(); Conversation conversation = getSelectedConversation();
if (conversation!=null) { if (conversation != null) {
savedInstanceState.putString(STATE_OPEN_CONVERSATION, savedInstanceState.putString(STATE_OPEN_CONVERSATION,
conversation.getUuid()); conversation.getUuid());
} }

View File

@ -522,9 +522,7 @@ public class ConversationFragment extends Fragment {
private void messageSent() { private void messageSent() {
int size = this.messageList.size(); int size = this.messageList.size();
if (size >= 1 && this.messagesView.getLastVisiblePosition() != size - 1) {
messagesView.setSelection(size - 1); messagesView.setSelection(size - 1);
}
mEditMessage.setText(""); mEditMessage.setText("");
updateChatMsgHint(); updateChatMsgHint();
} }

View File

@ -418,6 +418,13 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} }
if (type == STATUS || type == NULL) { if (type == STATUS || type == NULL) {
if (position == getCount() - 1) {
view.getLayoutParams().height = 1;
} else {
view.getLayoutParams().height = 0;
}
view.setLayoutParams(view.getLayoutParams());
return view; return view;
} }