1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 18:32:15 -05:00

Show messages in channel canvas

This commit is contained in:
Sebastian Kaspari 2010-03-05 16:25:15 +01:00
parent ebf72421cb
commit c1f392bf08
2 changed files with 15 additions and 1 deletions

View File

@ -99,6 +99,11 @@ public class DeckAdapter extends BaseAdapter
notifyDataSetChanged();
}
public void updated()
{
//notifyDataSetChanged();
}
/**
* Get view at given position

View File

@ -172,7 +172,16 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann
{
String message = server.getChannel(target).pollMessage();
Toast.makeText(this, "(" + target + ") " + message, Toast.LENGTH_SHORT).show();
TextView canvas = (TextView) deckAdapter.getItemByName(target);
if (canvas != null) {
Log.d(TAG, "Got canvas, setting text");
canvas.append("\n" + message);
deckAdapter.notifyDataSetChanged();
} else {
Log.d(TAG, "No canvas found");
}
//Toast.makeText(this, "(" + target + ") " + message, Toast.LENGTH_SHORT).show();
}
/**