Search in sources :

Example 1 with UserListAdapter

use of org.qii.weiciyuan.ui.adapter.UserListAdapter in project weiciyuan by qii.

the class AbstractUserListFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.listview_layout, container, false);
    empty = (TextView) view.findViewById(R.id.empty);
    progressBar = (ProgressBar) view.findViewById(R.id.progressbar);
    pullToRefreshListView = (PullToRefreshListView) view.findViewById(R.id.listView);
    pullToRefreshListView.setOnRefreshListener(new UserListOnRefreshListener());
    pullToRefreshListView.setOnLastItemVisibleListener(new UserListOnLastItemVisibleListener());
    pullToRefreshListView.setOnPullEventListener(getPullEventListener());
    pullToRefreshListView.setOnScrollListener(new UserListOnScrollListener());
    pullToRefreshListView.setOnItemClickListener(new UserListOnItemClickListener());
    pullToRefreshListView.getRefreshableView().setFooterDividersEnabled(false);
    footerView = inflater.inflate(R.layout.listview_footer_layout, null);
    getListView().addFooterView(footerView);
    dismissFooterView();
    userListAdapter = new UserListAdapter(AbstractUserListFragment.this, bean.getUsers(), getListView());
    pullToRefreshListView.setAdapter(userListAdapter);
    return view;
}
Also used : View(android.view.View) AdapterView(android.widget.AdapterView) PullToRefreshListView(org.qii.weiciyuan.support.lib.pulltorefresh.PullToRefreshListView) AbsListView(android.widget.AbsListView) TextView(android.widget.TextView) ListView(android.widget.ListView) UserListAdapter(org.qii.weiciyuan.ui.adapter.UserListAdapter)

Aggregations

View (android.view.View)1 AbsListView (android.widget.AbsListView)1 AdapterView (android.widget.AdapterView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 PullToRefreshListView (org.qii.weiciyuan.support.lib.pulltorefresh.PullToRefreshListView)1 UserListAdapter (org.qii.weiciyuan.ui.adapter.UserListAdapter)1