mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 15:19:53 +01:00
Pad the top and bottom of the list
This commit is contained in:
@@ -122,9 +122,19 @@ implements EventListener, OnClickListener, OnItemClickListener {
|
|||||||
layout.setOrientation(VERTICAL);
|
layout.setOrientation(VERTICAL);
|
||||||
|
|
||||||
adapter = new ConversationAdapter(this);
|
adapter = new ConversationAdapter(this);
|
||||||
list = new ListView(this);
|
list = new ListView(this) {
|
||||||
|
@Override
|
||||||
|
public void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||||
|
// Scroll to the bottom when the keyboard is shown
|
||||||
|
super.onSizeChanged(w, h, oldw, oldh);
|
||||||
|
setSelection(getCount() - 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
// Give me all the width and all the unused height
|
// Give me all the width and all the unused height
|
||||||
list.setLayoutParams(MATCH_WRAP_1);
|
list.setLayoutParams(MATCH_WRAP_1);
|
||||||
|
int pad = LayoutUtils.getPadding(this);
|
||||||
|
list.setPadding(0, pad, 0, pad);
|
||||||
|
list.setClipToPadding(false);
|
||||||
// Make the dividers the same colour as the background
|
// Make the dividers the same colour as the background
|
||||||
Resources res = getResources();
|
Resources res = getResources();
|
||||||
int background = res.getColor(R.color.conversation_background);
|
int background = res.getColor(R.color.conversation_background);
|
||||||
|
|||||||
Reference in New Issue
Block a user