Example #1
0
 @Override
 public void onClick(View arg0) {
   if (TwitterManager.getInstance().getUser() != null) {
     Log.e(TAG, "logout");
     TwitterManager.getInstance().logout();
   } else {
     Log.e(TAG, "login");
     TwitterManager.getInstance().login();
   }
 }
Example #2
0
 public Bitmap getImage(URL url) {
   try {
     //			Object content = url.getContent();
     //			InputStream is = (InputStream) content;
     InputStream is = (InputStream) url.openConnection().getInputStream();
     Bitmap b = BitmapFactory.decodeStream(is);
     is.close();
     return b;
   } catch (MalformedURLException e) {
     Log.printStackTrace(e);
     return null;
   } catch (IOException e) {
     Log.printStackTrace(e);
     return null;
   }
 }
Example #3
0
 /** @param mPicUrl the mPicUrl to set */
 public void setPicUrl(String mPicUrl) {
   this.mPicUrl = mPicUrl;
   try {
     mPic = getImage(new URL(mPicUrl));
   } catch (MalformedURLException e) {
     Log.printStackTrace(e);
   }
 }
Example #4
0
 public void debugWallPost() {
   for (WallPost wallpost : wallPosts.values()) {
     Log.err(wallpost.toString());
   }
 }