如何在Android Studio中查看Java的自动属性建议。

huangapple 未分类评论59阅读模式
英文:

How I can see Auto Attribute suggestion for Android Studio in Java

问题

XML文件在属性中不显示自动建议。我已经尝试过无效缓存/重启、删除.iml和.idea文件。我还安装了自动建议插件Codota。

这里orientation为空,不显示垂直或水平,TextView中情况也相同。

如何在Android Studio中查看Java的自动属性建议。

英文:

The XML file does not show auto suggestion in attribute. I have already done Invalidated catches/restart,deleted.iml and.idea file. I have also installed auto suggestion plugin codota.

Here orientation is empty, doesn't show vertical or horizontal, also same in TextView

如何在Android Studio中查看Java的自动属性建议。

答案1

得分: 0

为了使用自动属性,请将工具命名空间添加到每个 XML 文件的根元素中,您想要使用它们的位置,如下所示:

<app xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
英文:

To use auto attributes, add the tools namespace to the root element of each XML file where you'd like to use them, as shown here:

&lt;app xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;

huangapple
  • 本文由 发表于 2020年7月28日 23:54:44
  • 转载请务必保留本文链接:https://java.coder-hub.com/63138145.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定