aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-06 22:03:01 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-06 22:03:01 +0200
commitb6f5e4a217e3eaf6be94bc5efae41273d27944bc (patch)
tree6e4d9e261c43d3d68807732bd3119ab1f3951a7b
parent315731b0cf9b15a5e749a7ea35b8770e4dc94e74 (diff)
cleanung up the scroll fix a little
Diffstat (limited to '')
-rw-r--r--res/layout/message_null.xml2
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java2
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java4
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java7
4 files changed, 10 insertions, 5 deletions
diff --git a/res/layout/message_null.xml b/res/layout/message_null.xml
index 36eb860d..0e0f1c92 100644
--- a/res/layout/message_null.xml
+++ b/res/layout/message_null.xml
@@ -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> \ No newline at end of file
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index f94d6b73..6817a386 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -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());
}
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 716e299e..928bb6f3 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -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();
}
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 035d18c5..c8dd1f0e 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -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;
}