我想在我的類被調用時實現progessDialog。我知道如何爲使用AsyncTask的片段類實現progressDialog。但是在這裏我有一個不使用asyncTask的片段類。實現progressDialog
這個片段的功能是在調用它時顯示一些新聞細節。我想在新聞加載時顯示progressDialog,並在新聞加載並準備顯示時停止progressDialog。如何才能做到這一點?我是個新手,所以請大家幫我
我的片段類
package com.fortuna.cinemalk;
public class NewsDetailFragment extends Fragment {
private ViewPager view1;
private ViewPageAdapter adapter;
private Activity activity;
private CommonVariable commonVariable;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.newsdetail_fragment, container,
false);
activity = this.getActivity();
commonVariable = (CommonVariable) activity.getApplication();
view1 = (ViewPager) view.findViewById(R.id.listviewpager);
adapter = new ViewPageAdapter(commonVariable.getNewsDescription(),
Element.NEWS_DETAIL.getType(), activity);
view1.setAdapter(adapter);
return view;
}
}
數據如何加載新聞。u使用和Webservie加載新 – 2014-09-02 09:23:26