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"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="0.1dp"
android:layout_height="0dp"
android:background="#00000000">
</RelativeLayout>

View file

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

View file

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

View file

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