1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 10:52:16 -05:00

ConversationActivity: Use the icon as centered background

This commit is contained in:
Sebastian Kaspari 2010-03-17 21:52:51 +01:00
parent b100a9935b
commit 97b5467897

View File

@ -54,6 +54,7 @@ import org.yaaic.adapter.MessageListAdapter;
import org.yaaic.command.CommandParser; import org.yaaic.command.CommandParser;
import org.yaaic.irc.IRCBinder; import org.yaaic.irc.IRCBinder;
import org.yaaic.irc.IRCService; import org.yaaic.irc.IRCService;
import org.yaaic.layout.NonScalingBackgroundDrawable;
import org.yaaic.listener.ConversationListener; import org.yaaic.listener.ConversationListener;
import org.yaaic.listener.ServerListener; import org.yaaic.listener.ServerListener;
import org.yaaic.model.Broadcast; import org.yaaic.model.Broadcast;
@ -101,11 +102,12 @@ public class ConversationActivity extends Activity implements ServiceConnection,
((EditText) findViewById(R.id.input)).setOnKeyListener(this); ((EditText) findViewById(R.id.input)).setOnKeyListener(this);
deckAdapter = new DeckAdapter();
deck = (Gallery) findViewById(R.id.deck); deck = (Gallery) findViewById(R.id.deck);
deck.setOnItemSelectedListener(this); deck.setOnItemSelectedListener(this);
deckAdapter = new DeckAdapter();
deck.setAdapter(deckAdapter); deck.setAdapter(deckAdapter);
deck.setOnItemClickListener(this); deck.setOnItemClickListener(this);
deck.setBackgroundDrawable(new NonScalingBackgroundDrawable(this, deck, R.drawable.icon));
switcher = (ViewSwitcher) findViewById(R.id.switcher); switcher = (ViewSwitcher) findViewById(R.id.switcher);