Example usage for twitter4j UserList getName

List of usage examples for twitter4j UserList getName

Introduction

In this page you can find the example usage for twitter4j UserList getName.

Prototype

String getName();

Source Link

Document

Returns the name of the list

Usage

From source file:com.klinker.android.twitter.adapters.ListsArrayAdapter.java

License:Apache License

public void bindView(final View view, Context mContext, final UserList list) {
    final ViewHolder holder = (ViewHolder) view.getTag();

    final String name = list.getName();
    final String id = list.getId() + "";

    holder.text.setText(name);/*from  w  w  w  .  j  a  v  a 2s.co  m*/

    holder.text.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent list = new Intent(context, ChoosenListActivity.class);
            list.putExtra("list_id", id);
            list.putExtra("list_name", name);
            list.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            context.startActivity(list);
        }
    });

    holder.text.setOnLongClickListener(new View.OnLongClickListener() {
        @Override
        public boolean onLongClick(View view) {

            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setItems(R.array.lists_options, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int i) {
                    final int DELETE_LIST = 0;
                    final int VIEW_USERS = 1;
                    switch (i) {
                    case DELETE_LIST:
                        new DeleteList().execute(id + "");
                        break;

                    case VIEW_USERS:
                        Intent viewUsers = new Intent(context, ViewUsers.class);
                        viewUsers.putExtra("list_id", Integer.parseInt(id));
                        viewUsers.putExtra("list_name", name);
                        context.startActivity(viewUsers);
                        break;
                    }

                }
            });

            builder.create();
            builder.show();

            return false;
        }
    });

}

From source file:com.klinker.android.twitter.settings.configure_pages.ListChooser.java

License:Apache License

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    context = this;
    sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences",
            Context.MODE_WORLD_READABLE + Context.MODE_WORLD_WRITEABLE);
    settings = AppSettings.getInstance(this);

    Utils.setUpTheme(context, settings);
    setContentView(R.layout.list_chooser);

    actionBar = getActionBar();//from www. j a v  a 2  s. com
    actionBar.setTitle(getResources().getString(R.string.lists));

    if (!settings.isTwitterLoggedIn) {
        Intent login = new Intent(context, LoginActivity.class);
        startActivity(login);
        finish();
    }

    listView = (AsyncListView) findViewById(R.id.listView);
    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
            UserList list = arrayAdapter.getItem(i);
            Intent returnIntent = new Intent();
            returnIntent.putExtra("listId", list.getId());
            returnIntent.putExtra("listName", list.getName());
            setResult(RESULT_OK, returnIntent);
            finish();
        }
    });

    new GetLists().execute();
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListMemberAddition(User addedMember, User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListMemberAddition added member:@"
            + addedMember.getScreenName() + " listOwner:@" + listOwner.getScreenName() + " list:"
            + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListMemberDeletion(User deletedMember, User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListMemberDeleted deleted member:@"
            + deletedMember.getScreenName() + " listOwner:@" + listOwner.getScreenName() + " list:"
            + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListSubscription(User subscriber, User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListSubscribed subscriber:@"
            + subscriber.getScreenName() + " listOwner:@" + listOwner.getScreenName() + " list:"
            + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListUnsubscription(User subscriber, User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListUnsubscribed subscriber:@"
            + subscriber.getScreenName() + " listOwner:@" + listOwner.getScreenName() + " list:"
            + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListCreation(User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just loggimng, onUserListCreated  listOwner:@"
            + listOwner.getScreenName() + " list:" + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListUpdate(User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListUpdated  listOwner:@"
            + listOwner.getScreenName() + " list:" + list.getName());
}

From source file:com.tuncaysenturk.jira.plugins.jtp.twitter.JiraTwitterUserStreamListener.java

public void onUserListDeletion(User listOwner, UserList list) {
    logger.info(JTPConstants.LOG_PRE + "just logging, onUserListDestroyed  listOwner:@"
            + listOwner.getScreenName() + " list:" + list.getName());
}

From source file:com.tweetmyhome.TweetMyHome.java

@Override
public void onUserListMemberAddition(User addedMember, User listOwner, UserList list) {
    debug("onUserListMemberAddition added member:@" + addedMember.getScreenName() + " listOwner:@"
            + listOwner.getScreenName() + " list:" + list.getName());
}