Esempio n. 1
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View root = View.inflate(getActivity(), R.layout.fragment_story, null);
   listView = (XListView) root.findViewById(R.id.xListView);
   listView.setPullLoadEnable(true);
   listView.setPullRefreshEnable(true);
   listView.setXListViewListener(this);
   /*listView.setOnItemClickListener(this);*/
   load = root.findViewById(R.id.load);
   load.setVisibility(View.GONE);
   nodata = root.findViewById(R.id.nodata);
   listView.setVisibility(View.VISIBLE);
   nodata.setVisibility(View.GONE);
   return root;
 }
Esempio n. 2
0
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   setHasOptionsMenu(true);
   page = 1;
   /*connectServer();*/
   adapter = new StoryAdapter(getActivity());
   /*adapter.setOnClickListener(this);*/
   listView.setAdapter(adapter);
   adapter.notifyDataSetChanged();
 }