[英]Toolbar HOME not working when CollapsingToolbarLayout collapsed
Posting this now, will update with more specific XML when I get home, but I have a layout setup: 现在发布,当我回到家时会更新更具体的XML,但我有一个布局设置:
Coordinator - Appbar -- Collapsing --- ImageView --- Toolbar -- Frame/Recycler (fragment loaded) 协调员 - Appbar - 折叠--- ImageView ---工具栏 - 框架/循环器(片段加载)
And everything is cool, the Home/Back button works in the toolbar when the CollapsingToolbarLayout is expanded. 并且一切都很酷,当扩展CollapsingToolbarLayout时,Home / Back按钮在工具栏中工作。 But as soon as the title of the collapsing toolbar moves into the spot beside the Home button, the button is no longer clickable.
但是,只要折叠工具栏的标题移动到“主页”按钮旁边的位置,该按钮就不再可单击。
The back button is responding to touches all the way up until its nearly almost collapsed. 后退按钮一直对触摸进行响应,直到其几乎崩溃为止。
It's as if the Title in the collapsing toolbar is catching the touch events and consuming them. 就好像折叠工具栏中的标题正在捕捉触摸事件并消耗它们一样。 But I couldn't find anything from looking around that might explain that.
但我找不到任何可以解释的东西。
I'll post more complete Xml after work. 我下班后会发布更完整的Xml。 But hopefully someone has had something similar just from the description.
但是希望有人从描述中得到了类似的东西。
Resolved ish. 解决了ish。 I was using a base activity and common XML file and for some reason it was not liking that.
我正在使用基本活动和常见的XML文件,并且由于某种原因它不喜欢它。 I created a new XML by copying the common and adding the nested scroll view to the activity instead of fragment.
我通过复制common并将嵌套的scroll视图添加到activity而不是fragment来创建了一个新的XML。 Now the fragment is just a linear layout.
现在片段只是一个线性布局。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.