开发者

Progress bar appears with loading string before fragment gets loaded in HoneyComb3.0

开发者 https://www.devze.com 2023-02-10 11:29 出处:网络
hi I am writing an Android application in which I displays a List . Clicking on any item on list will display another list which is a Fragment.Say this Fragment as Fragment1.I will display this fragm

hi

I am writing an Android application in which I displays a List . Clicking on any item on list will display another list which is a Fragment.Say this Fragment as Fragment1.I will display this fragment every time I click 1,2,4 listitems. But When I clic开发者_如何学Pythonk ListItem3 I will display another Fragment say Fragment2 besides Fragment1. My question is before clicking the ListItem3, a ProgressBar with "Loading" text is displayed at a place where Fragment2 is supposed to be displayed when I click ListItem3. The ProgressBar is there even after the Fragment2 is displayed. Can anyone tell me the reason why this ProgressBar is displayed? I will be waiting for reply.

Thanks in Advance.


I too was stuck with the similar problem and the answer of @JasonKnight in this question solved my trouble. I did:

public class PoursFragment extends ListFragment {

@Override
public void onActivityCreated(Bundle savedState) {
    super.onActivityCreated(savedState);
    this.setListShown(true);
    ...
0

精彩评论

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