Android L - Material design on SwipeRefreshLayout color scheme

后端 未结 2 1612
终归单人心
终归单人心 2021-01-30 16:16

I´m starting to implement the Material Theme on my newest project, preparing it for the launch of the new L version.

I´ve been reading the Material design guidelines and

2条回答
  •  走了就别回头了
    2021-01-30 17:20

    Given solution did not work for me.

    I simple extended and used this instead.

    class SwipeToRefreshLayout(context: Context, attrs: AttributeSet): SwipeRefreshLayout(context, attrs)  {
    
    var listener: OnRefreshListener? = null
    
    fun setRefreshing(refreshing: Boolean, fireCallback: Boolean) {
        super.setRefreshing(refreshing)
        listener?.onRefresh()
    }
    
    override fun setOnRefreshListener(listener: OnRefreshListener?) {
        super.setOnRefreshListener(listener)
        this.listener = listener
    }
    }
    

    I hope someone finds it helpful.

提交回复
热议问题