Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教一下,怎么结合SwipeRefreshLayout完成列表刷新 #2

Open
mingmingacc opened this issue Jan 6, 2017 · 2 comments
Open

Comments

@mingmingacc
Copy link

您好,我有一个疑问,就是内容区域加入一个ListView,怎么结合SwipeRefrshLayout实现列表刷新呢?

@lawdao
Copy link
Owner

lawdao commented Jan 6, 2017 via email

@lawdao
Copy link
Owner

lawdao commented Jan 6, 2017

你好:

内容区可以添加一个布局,也就是xml文件,比如这样:

 ```

//init content view

    View contentView = View.inflate(UiUtils.getContext(), R.layout.view_content, null);

    waterListView = (WaterDropListView) contentView.findViewById(R.id.list_view);

    et_search = (SearchEditText) contentView.findViewById(R.id.et_search);

    view_null = contentView.findViewById(R.id.view_null);
    text_null = (TextView) contentView.findViewById(R.id.text_null);

    waterListView.setPullLoadEnable(true);
    waterListView.setOverScrollMode(View.OVER_SCROLL_NEVER);
    waterListView.setAdapter(materialAdapter);
    waterListView.setOnItemClickListener(this);
    waterListView.setWaterDropListViewListener(this);


    et_search.setOnSearchClickListener(this);

    //init dropdownview

    mDropDownMenu.setDropDownMenu(Arrays.asList(headers), popupViews, contentView);



将布局文件添加至内容区 ,那么这个时候,你就可以随心所欲了,也就是内容区 你随便怎么写都可以

希望我解答了你的问题

欢迎关注我的微信公共号:AppCode

以后有什么问题 可以在公共号里直接 提问

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants