List of usage examples for twitter4j UserList getDescription
String getDescription();
From source file:com.dwdesign.tweetings.fragment.UserListDetailsFragment.java
License:Open Source License
public void changeUserList(final long account_id, final UserList user_list) { if (user_list == null || getActivity() == null || !isMyActivatedAccount(getActivity(), account_id)) return;// w ww . j a v a2s .c om getLoaderManager().destroyLoader(0); final User user = user_list.getUser(); if (user == null) return; final boolean is_my_activated_account = isMyActivatedAccount(getActivity(), user_list.getId()); mErrorRetryContainer.setVisibility(View.GONE); mAccountId = account_id; mUserListId = user_list.getId(); mUserName = user.getName(); mUserId = user.getId(); mUserScreenName = user.getScreenName(); mListName = user_list.getName(); mListSlug = user_list.getSlug(); final boolean is_multiple_account_enabled = getActivatedAccountIds(getActivity()).length > 1; mListView.setBackgroundResource(is_multiple_account_enabled ? R.drawable.ic_label_account_nopadding : 0); if (is_multiple_account_enabled) { final Drawable d = mListView.getBackground(); if (d != null) { d.mutate().setColorFilter(getAccountColor(getActivity(), account_id), PorterDuff.Mode.MULTIPLY); mListView.invalidate(); } } mListNameView.setText(mListName); mUserNameView.setText(mDisplayName ? mUserName : mUserScreenName); final String description = user_list.getDescription(); mDescriptionContainer .setVisibility(is_my_activated_account || !isNullOrEmpty(description) ? View.VISIBLE : View.GONE); mDescriptionContainer.setOnLongClickListener(this); mDescriptionView.setText(description); final TwidereLinkify linkify = new TwidereLinkify(mDescriptionView); linkify.setOnLinkClickListener(this); linkify.addAllLinks(); mDescriptionView.setMovementMethod(LinkMovementMethod.getInstance()); final String profile_image_url_string = parseString(user.getProfileImageURL()); final boolean hires_profile_image = getResources().getBoolean(R.bool.hires_profile_image); mProfileImageLoader.displayProfileImage(mProfileImageView, hires_profile_image ? getBiggerTwitterProfileImage(profile_image_url_string) : profile_image_url_string); mUserList = user_list; //if (mUserId == mAccountId) { mFollowMoreButton.setText(R.string.more); mFollowMoreButton.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.expander_open_holo, 0); //} else { // mFollowMoreButton.setText(user_list.isFollowing() ? R.string.unfollow : R.string.follow); // mFollowMoreButton.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); //} mAdapter.notifyDataSetChanged(); }
From source file:com.dwdesign.tweetings.model.ParcelableUserList.java
License:Open Source License
public ParcelableUserList(final UserList list, final long account_id, final long position) { final User user = list.getUser(); this.position = position; this.account_id = account_id; list_id = list.getId();/*from ww w . j a va 2s . c o m*/ is_public = list.isPublic(); is_following = list.isFollowing(); name = list.getName(); description = list.getDescription(); user_id = user.getId(); user_name = user.getName(); user_screen_name = user.getScreenName(); user_profile_image_url = user.getProfileImageURL(); user_profile_image_url_string = parseString(user_profile_image_url); }
From source file:de.vanita5.twittnuker.model.ParcelableUserList.java
License:Open Source License
public ParcelableUserList(final UserList list, final long account_id, final long position, final boolean is_following) { final User user = list.getUser(); this.position = position; this.account_id = account_id; id = list.getId();/*from www . j a v a2s . com*/ is_public = list.isPublic(); this.is_following = is_following; name = list.getName(); description = list.getDescription(); user_id = user.getId(); user_name = user.getName(); user_screen_name = user.getScreenName(); user_profile_image_url = ParseUtils.parseString(user.getProfileImageUrlHttps()); members_count = list.getMemberCount(); subscribers_count = list.getSubscriberCount(); }
From source file:org.getlantern.firetweet.model.ParcelableUserList.java
License:Open Source License
public ParcelableUserList(final UserList list, final long account_id, final long position, final boolean is_following) { final User user = list.getUser(); this.position = position; this.account_id = account_id; id = list.getId();/*from www. j a v a 2s . c o m*/ is_public = list.isPublic(); this.is_following = is_following; name = list.getName(); description = list.getDescription(); user_id = user.getId(); user_name = user.getName(); user_screen_name = user.getScreenName(); user_profile_image_url = user.getProfileImageUrlHttps(); members_count = list.getMemberCount(); subscribers_count = list.getSubscriberCount(); }
From source file:org.tweetalib.android.model.TwitterList.java
License:Apache License
public TwitterList(UserList list) { mId = list.getId();/* w w w. j av a 2 s . c o m*/ mName = list.getName(); mFullName = list.getFullName(); mDescription = list.getDescription(); mIsPublic = list.isPublic(); mIsFollowing = list.isFollowing(); mMemberCount = list.getMemberCount(); mSubscriberCount = list.getSubscriberCount(); }
From source file:twitter4j.examples.list.GetUserListMemberships.java
License:Apache License
/** * Usage: java twitter4j.examples.list.GetUserListMemberships [list member screen name] * * @param args message//from ww w .j a v a 2 s . c o m */ public static void main(String[] args) { if (args.length < 1) { System.out.println( "Usage: java twitter4j.examples.list.GetUserListMemberships [list member screen name]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); long cursor = -1; PagableResponseList<UserList> lists; do { lists = twitter.getUserListMemberships(args[0], cursor); for (UserList list : lists) { System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:" + list.getDescription() + ", slug:" + list.getSlug() + ""); } } while ((cursor = lists.getNextCursor()) != 0); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to list the lists: " + te.getMessage()); System.exit(-1); } }
From source file:twitter4j.examples.list.GetUserLists.java
License:Apache License
/** * Usage: java twitter4j.examples.list.GetUserLists [list owner screen name] * * @param args message/*from ww w. ja va 2 s.co m*/ */ public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java twitter4j.examples.list.GetUserLists [list owner screen name]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); ResponseList<UserList> lists = twitter.getUserLists(args[0]); for (UserList list : lists) { System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:" + list.getDescription() + ", slug:" + list.getSlug() + ""); } System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to list the lists: " + te.getMessage()); System.exit(-1); } }
From source file:twitter4j.examples.list.GetUserListSubscriptions.java
License:Apache License
/** * Usage: java twitter4j.examples.list.GetUserListSubscriptions [screen name] * * @param args message/*from w w w. ja v a2 s. c om*/ */ public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java twitter4j.examples.list.GetUserListSubscriptions [screen name]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); long cursor = -1; PagableResponseList<UserList> lists; do { lists = twitter.getUserListSubscriptions(args[0], cursor); for (UserList list : lists) { System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:" + list.getDescription() + ", slug:" + list.getSlug() + ""); } } while ((cursor = lists.getNextCursor()) != 0); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to list the lists: " + te.getMessage()); System.exit(-1); } }
From source file:twitter4j.examples.list.ShowUserList.java
License:Apache License
/** * Usage: java twitter4j.examples.list.ShowUserList [list id] * * @param args message//w ww. jav a 2 s. c om */ public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java twitter4j.examples.list.ShowUserList [list id]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); UserList list = twitter.showUserList(Integer.parseInt(args[0])); System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:" + list.getDescription() + ", slug:" + list.getSlug() + ""); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to show the list: " + te.getMessage()); System.exit(-1); } }