简体   繁体   English

ConstraintLayout 链上下文菜单在 Android Studio 中不再可见

[英]ConstraintLayout chain context menu no longer visible in Android Studio

Using Android Studio 3.4 Canary 9 and 10 ConstraintLayout 2.0.0.alpha3使用 Android Studio 3.4 Canary 9 和 10 ConstraintLayout 2.0.0.alpha3

I am having an issue with constraint layout in the bleeding edge build of Android Studio 3.4 canary 9. Basically, when you click on a view in constraint layout, say on a chain element, you should be able to see small icons appear that allow you to perform certain actions on the views.我在 Android Studio 3.4 canary 9 的最新版本中遇到了约束布局问题。基本上,当您单击约束布局中的视图时,例如在链元素上,您应该能够看到小图标出现,允许您对视图执行某些操作。

带有上下文菜单按钮的约束布局

As you can see, under each view are 3 buttons that allow you to change the chain settings.如您所见,每个视图下方都有 3 个按钮,可让您更改链设置。 However, this is what I get in my layout editor on 3.4.C09 when clicking on an element in a chain:但是,当单击链中的元素时,这是我在 3.4.C09 上的布局编辑器中得到的结果:

3.4.C09 中缺少上下文菜单

Did they get disabled or moved elsewhere?他们有没有残疾或搬到别处? Is this a bug?这是一个错误吗? I have looked everywhere in the IDE without any luck, tried zooming in / zooming out, changing the theme, invalidating caches/restart, clean rebuild etc.我在 IDE 中到处查看,但没有任何运气,尝试放大/缩小,更改主题,使缓存/重启无效,干净重建等。

Thank you for any help provided!感谢您提供的任何帮助!

UPDATE更新

Now you should see Circle Chain mode option in right-click menu in Android Studio 3.6.现在您应该在 Android Studio 3.6 的右键菜单中看到Circle Chain mode选项。


According to the official response, this function has been removed in AS3.4.根据官方回应,此功能在AS3.4中已被移除。 But there seems to be no alternative.但似乎别无选择。 I have reported this problem to Goole and you can track here .我已向 Goole 报告了此问题,您可以在此处进行跟踪。

For now, you can add app:layout_constraintHorizontal_chainStyle attr in xml manually.现在,您可以手动在 xml 中添加app:layout_constraintHorizontal_chainStyle attr。 And after that Cycle chain mode options will appeare in the right-click menu.之后, Cycle chain mode选项将出现在右键菜单中。

It is now available in attributes under layout_constraints .它现在在layout_constraints下的属性中可用。 ( AS 3.5 ) (AS 3.5)

在此处输入图片说明

你正试图在单个按钮上连接苹果链...首先通过键盘上的Ctrl选择多个项目,如按钮,然后右键单击鼠标,你会在你的android工作室看到链启用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM