diff --git a/src/org/yaaic/adapter/DeckAdapter.java b/src/org/yaaic/adapter/DeckAdapter.java index 204a857..460b2a3 100644 --- a/src/org/yaaic/adapter/DeckAdapter.java +++ b/src/org/yaaic/adapter/DeckAdapter.java @@ -194,6 +194,8 @@ public class DeckAdapter extends BaseAdapter list.setAdapter(new MessageListAdapter(channel, parent.getContext())); // XXX: Refactor this crap :) + // XXX: In addition to that we need to resize the lists if the + // screen is resized or rotated float fw = (float) width; float fh = (float) height; @@ -204,6 +206,7 @@ public class DeckAdapter extends BaseAdapter int w = (int) vwf; int h = (int) vhf; + list.setDivider(null); list.setLayoutParams(new Gallery.LayoutParams(w, h)); list.setBackgroundColor(0xff222222); list.setPadding(5, 5, 5, 5); @@ -211,32 +214,5 @@ public class DeckAdapter extends BaseAdapter list.setScrollContainer(false); return list; - - /* - TextView canvas = new TextView(parent.getContext()); - - SpannableString welcome = new SpannableString("Joined " + channel.getName()); - canvas.setText(welcome); - - for (Message message : channel.getHistory()) { - canvas.append(message.render(canvas.getContext())); - } - - // XXX: Refactor this crap :) - - float fw = (float) width; - float fh = (float) height; - - float vwf = fw / 100 * 80; - float vhf = fh / 100 * 80; - - int w = (int) vwf; - int h = (int) vhf; - - //channelView.setLayoutParams(new Gallery.LayoutParams(w, h)); - canvas.setLayoutParams(new Gallery.LayoutParams(w, h)); - - return canvas; - */ } } diff --git a/src/org/yaaic/model/Message.java b/src/org/yaaic/model/Message.java index a673cce..c6e007c 100644 --- a/src/org/yaaic/model/Message.java +++ b/src/org/yaaic/model/Message.java @@ -109,7 +109,7 @@ public class Message { public SpannableString render(Context context) { if (canvas == null) { - String prefix = hasIcon() ? "\n " : "\n"; + String prefix = hasIcon() ? " " : ""; canvas = new SpannableString(prefix + text); if (hasIcon()) { Drawable drawable = context.getResources().getDrawable(icon);