ListView and undeterminate ProgressBar

Posted by Spredzy on Stack Overflow See other posts from Stack Overflow or by Spredzy
Published on 2010-05-06T14:24:51Z Indexed on 2010/05/06 14:28 UTC
Read the original article Hit count: 335

Sorry for the question it might sounds stupid,

But: how do you activate a ProgressBar according to the cell you just cliked on ?

I have a list view, with a menu that shows after a long press.

When I click on one of my option I would like to display the ProgressBar in the listView according to the cell I clicked on. It is currently always displaying the one of my first cell, whatever I am doing

public boolean onContextItemSelected(MenuItem item) {
     AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();

     switch (item.getOrder()) {
        case 0:
                    mProgressBar = (ProgressBar)findViewById(R.id.welcome_progressbar);
                    mProgressBar.setVisibility(View.VISIBLE);
            ... some execution ....

                    return true;
        case 1:
                     ...

Does anyone see anything wrong?

© Stack Overflow or respective owner

Related posts about android

Related posts about listview