Exemplo n.º 1
0
 public void onClick(View v) {
   Editable editor = mStatusText.getText();
   String update = editor.toString();
   if (update.length() != 0) {
     editor.clear();
     Helpers.sendToFeed(getActivity(), StatusObj.from(update), mFeedUri);
   }
   InputMethodManager imm =
       (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
   imm.hideSoftInputFromWindow(mStatusText.getWindowToken(), 0);
 }
Exemplo n.º 2
0
 public void onChange(boolean selfChange) {
   if (mSharePhotos) {
     try {
       Uri photo = getLatestCameraPhoto();
       if (photo == null || photo.equals(mLastShared)) {
         return;
       }
       mLastShared = photo;
       DbObject obj = PictureObj.from(mmContext, photo);
       for (Uri uri : getFeedsWithPresence()) {
         Helpers.sendToFeed(mmContext, obj, uri);
       }
     } catch (IOException e) {
     }
   }
 };