1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-12-01 05:12:18 -05:00

MessageListView: Set transcript mode to normal (Only automatically scroll if the last item is visible). Fixes #119.

This commit is contained in:
Sebastian Kaspari 2013-01-21 21:15:22 +01:00
parent dbdc731965
commit 81b7fe798c

View File

@ -51,15 +51,13 @@ public class MessageListView extends ListView
setVerticalFadingEdgeEnabled(false); setVerticalFadingEdgeEnabled(false);
setBackgroundResource(R.layout.conversation_background); setBackgroundResource(R.layout.conversation_background);
setScrollBarStyle(SCROLLBARS_OUTSIDE_INSET); setScrollBarStyle(SCROLLBARS_OUTSIDE_INSET);
setTranscriptMode(TRANSCRIPT_MODE_ALWAYS_SCROLL);
// Scale padding by screen density // Scale padding by screen density
float density = context.getResources().getDisplayMetrics().density; float density = context.getResources().getDisplayMetrics().density;
int padding = (int) (5 * density); int padding = (int) (5 * density);
setPadding(padding, padding, padding, padding); setPadding(padding, padding, padding, padding);
// XXX: This should be dynamically setTranscriptMode(TRANSCRIPT_MODE_NORMAL);
setTranscriptMode(TRANSCRIPT_MODE_ALWAYS_SCROLL);
} }
/** /**