Ejemplo n.º 1
0
 /** sends the message if there's anything to send */
 private void sendMessage() {
   String input = uiInput.getText().toString();
   if (input.length() != 0) BufferList.addSentMessage(input);
   String[] lines = input.split("\n");
   for (String line : lines) {
     if (line.length() != 0) relay.sendMessage("input " + buffer.fullName + " " + line);
   }
   uiInput.setText(""); // this will reset tab completion
 }
Ejemplo n.º 2
0
 @Override
 public void onBuffersChanged() {
   final ArrayList<Buffer> buffers = BufferList.getBufferList();
   activity.runOnUiThread(
       new Runnable() {
         @Override
         public void run() {
           BufferListAdapter.this.buffers = buffers;
           notifyDataSetChanged();
         }
       });
 }