开发者

Display progress bar onlistitemclick()

Actually I know how to display progress bar using async activity using onpreexecute() method. But here my problem is when I click on list I am able to go other activity but it takes time to go other activity.This is because it takes data from some classes and use it to in next activity class, so till that time my process remain idle I want to show progress bar for that time of intervel on which it taking data and is idle so how to show progressbar.

If I use async task then what should be in onpostexecute() because all the content are positio开发者_运维百科n dependnt and take data according to position of list item click please tell me any solution. My code for onlistitemclick is below

@Override
         protected void onListItemClick(ListView l, View v, int position, long thisID)
         {
              super.onListItemClick(l, v, position, thisID);

               Toast.makeText(this, "u clicked Id=" + keywordsearch.array_email[position] ,Toast.LENGTH_LONG).show();
               galleryname  =    keywordsearch.array_galleryname[position];
               address= keywordsearch.array_address[position];
               email= keywordsearch.array_email[position];
               web= keywordsearch.array_web[position];
               phone= keywordsearch.array_phone[position];
               lati= keywordsearch.array_lati[position];
               longi= keywordsearch.array_longi[position];
               filtersearchresultparsing.galleryurl  =    keywordsearch.array_imgurl[position];
               Log.i("image url........." ,  galleryname);
   Intent i = new Intent(keywordxmlparsing.this, detailviewshowingnowTab.class);
               startActivity(i);


}}


I can't understand your code, you're starting a new Activity and then executing the remaining code in the first activity, what's the point in this? If this code refers to the first activity, you should place it before starting a new activity. If the code refers to the second activity, you should place it in this activity's onCreate method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜