1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-08-13 16:53:50 -04:00

Fixed NullPointerException when switching to fullscreen mode

This commit is contained in:
Sebastian Kaspari 2010-06-26 20:20:26 +02:00
parent 3169312230
commit 7680f34bc5

View File

@ -117,6 +117,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
((TextView) findViewById(R.id.title)).setText(server.getTitle());
((EditText) findViewById(R.id.input)).setOnKeyListener(this);
switcher = (ViewSwitcher) findViewById(R.id.switcher);
deckAdapter = new DeckAdapter();
deck = (Gallery) findViewById(R.id.deck);
deck.setOnItemSelectedListener(new ConversationSelectedListener(server, (TextView) findViewById(R.id.title)));
@ -128,8 +130,6 @@ public class ConversationActivity extends Activity implements ServiceConnection,
server.clearConversations();
deckAdapter.clearConversations();
}
switcher = (ViewSwitcher) findViewById(R.id.switcher);
// Optimization : cache field lookups
Collection<Conversation> mConversations = server.getConversations();