Example #1
0
 @SuppressLint("CommitPrefEdits")
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.guid_submit:
       guid_text.setEnabled(!guid_text.isEnabled());
       guid = guid_text.getText().toString();
       prefs.edit().putString("guid", guid).commit();
       foobar.updateGuid(guid);
       try {
         foobar.pollState(this);
       } catch (Exception ex) {
         ex.printStackTrace();
       }
       break;
     case R.id.pull:
       try {
         foobar.pollState(this);
       } catch (Exception ex) {
         ex.printStackTrace();
       }
       break;
     case R.id.push:
       try {
         foobar.pushState();
       } catch (Exception ex) {
         ex.printStackTrace();
       }
       break;
     default:
       Toast.makeText(this, "Not Implemented", Toast.LENGTH_SHORT).show();
   }
 }
 private boolean whisperGroupUiEnabled() {
   return groupName.isEnabled() && avatar.isEnabled();
 }
 @Override
 public boolean isEnabled() {
   return etPicker.isEnabled();
 }