zoukankan      html  css  js  c++  java
  • SwipeRefreshLayout 首次打开出现加载图标

    最近要实现如何如图效果:

     

     

    主要是在初始化,代码如下:

    private void setSwipeRefresh() {
        TypedValue typed_value = new TypedValue();    this.getTheme().resolveAttribute(android.support.v7.appcompat.R.attr.actionBarSize, typed_value, true);
        refreshLayout.setProgressViewOffset(false0, getResources().getDimensionPixelSize(typed_value.resourceId));
        refreshLayout.setRefreshing(true);
    }

     

    Activity如下:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ayout);
        refreshLayout = (SwipeRefreshLayout) this.findViewById(R.id.refresh_layout);
        refreshLayout.setOnRefreshListener(this);
        setSwipeRefresh();
        //设置颜色
        refreshLayout.setColorSchemeResources(R.color.green,R.color.gray, R.color.blue_50, R.color.light_white);
    }

     





  • 相关阅读:
    java 多线程4: java线程的优先级
    Thread.currentThread().getName() ,对象实例.getName() 和 this.getName()区别
    go http
    go redis
    go tcp
    go 单元测试
    go 定时器
    go channel
    go goroutine
    go 错误处理
  • 原文地址:https://www.cnblogs.com/ut2016-progam/p/5673102.html
Copyright © 2011-2022 走看看