见下面的代码
<relativeLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent" tools:context=".screens.ShowSubjectsFrag" xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:app="http://schemas.androID.com/apk/res-auto" xmlns:tools="http://schemas.androID.com/tools"> <androID.support.v7.Widget.RecyclerVIEw androID:ID="@+ID/MainList" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:layout_gravity="center"> </androID.support.v7.Widget.RecyclerVIEw> <androID.support.design.Widget.floatingActionbutton androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:src="@androID:drawable/ic_input_add" app:layout_anchor="@ID/MainList" androID:layout_margin="@dimen/fab_margin" androID:layout_alignParentBottom="true" androID:layout_alignParentRight="true" androID:layout_alignParentEnd="true" /></relativeLayout>解决方法 在Activity / Fragment中为floatingActionbutton编写VIEw#onClickListener,因为当前您的floatingActionbutton没有为任何事件注册. 有同样的问题 干杯 总结
以上是内存溢出为你收集整理的android – 单击右上角的Floating ActionButton可以点击RecyclerView项目全部内容,希望文章能够帮你解决android – 单击右上角的Floating ActionButton可以点击RecyclerView项目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)