1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -05:00

Disable input if not connected

This commit is contained in:
Sebastian Kaspari 2010-03-10 23:12:01 +01:00
parent ac48ee9aae
commit 9efb7b8e4a

View File

@ -95,7 +95,13 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann
((TextView) findViewById(R.id.title)).setText(server.getTitle()); ((TextView) findViewById(R.id.title)).setText(server.getTitle());
((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon()); ((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon());
((EditText) findViewById(R.id.input)).setOnKeyListener(this);
EditText input = (EditText) findViewById(R.id.input);
input.setOnKeyListener(this);
if (!server.isConnected()) {
input.setEnabled(false);
}
deck = (Gallery) findViewById(R.id.deck); deck = (Gallery) findViewById(R.id.deck);
deck.setOnItemSelectedListener(this); deck.setOnItemSelectedListener(this);