@Override
 protected void reload() {
   super.reload();
   refreshScrollView.setMode(Mode.BOTH);
   pagenum = 0;
   localServices.clear();
   serviceAdapter.notifyDataSetChanged();
   pagenum++;
   getService();
 }
 @Override
 protected void registerViews() {
   refreshScrollView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
   refreshScrollView.setOnRefreshListener(
       new PullToRefreshBase.OnRefreshListener<ScrollView>() {
         @Override
         public void onRefresh(PullToRefreshBase<ScrollView> refreshView) {
           getProductClass();
         }
       });
   listView.setOnItemClickListener(
       new AdapterView.OnItemClickListener() {
         @Override
         public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
           select(productClasses.get(i));
         }
       });
 }
Ejemplo n.º 3
0
 @Override
 public void onViewCreated(View view, Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onViewCreated(view, savedInstanceState);
   httpUtils = new HttpUtils();
   homeGrid = (GridView) view.findViewById(R.id.homeContentType);
   homeList = (ListView) view.findViewById(R.id.homeTuanGouList);
   homeRgs = (ViewGroup) view.findViewById(R.id.homePageRadio);
   homePager = (ViewPager) view.findViewById(R.id.homeAutoViewPager);
   pullToRefreshScrollView =
       (PullToRefreshScrollView) view.findViewById(R.id.homeRefreshScrollLayout);
   pullToRefreshScrollView.setMode(Mode.BOTH);
   //		pullToRefreshScrollView.setOnRefreshListener(new OnScrollRefreshListener());
   initGridView();
   initHomeList();
   initData();
   AutoScrollViewPager autoViewPager = new AutoScrollViewPager(getActivity(), homePager, homeRgs);
   autoViewPager.startScroll();
 }
  @Override
  protected void initViews() {

    wuliuList.setAdapter(wuliuAdapter);
    refreshScrollView.setMode(Mode.PULL_FROM_START);
  }
 @Override
 protected void initViews() {
   refreshScrollView.setMode(Mode.BOTH);
   listView.setAdapter(serviceAdapter);
 }