【问题标题】:Can the progress bar of SwipeRefreshLayout be re-positioned to be at the bottom of the activitySwipeRefreshLayout的进度条可以重新定位到activity的底部吗
【发布时间】:2014-07-08 05:36:10
【问题描述】:

SwipeRefreshLayout的进度条可以设置在activity底部吗?

我希望在listview或gridview结束时显示进度条,然后显示进度条,并加载更多数据,但进度条应位于listview或girdview的底部。

【问题讨论】:

    标签: android listview gridview swiperefreshlayout


    【解决方案1】:

    你必须在活动中增加一个页脚视图。

    If you getting data from async task in pre execute method add footer view to your list      view.
    in post execute remove the footer. 
    1)in onPreExecute():
    lv.addFooterView(Footer);
    

    2) 在 onPostExecute() 中: lv.removeFooterView(页脚);

    【讨论】:

    • 这就是问题所在。 GridView中不能添加footerView
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-07
    • 2014-09-12
    • 2016-04-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多