内容辅助不使用XML支持库工作 [英] Content Assist doesn't work in xml with support library

查看:166
本文介绍了内容辅助不使用XML支持库工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Andr​​oid应用程序使用抽屉式导航从支持库V4。

I had to use Navigation Drawer from the support library v4 in my Android app.

我链接的库与我的Eclipse项目。它复制到我的项目的libs文件夹。结果
库类是我在访问我的Java文件。进口做工精细。即使是XML code,我从<复制的href=\"http://www.recursiverobot.com/post/59404388046/implementing-the-new-navigation-drawer-in-android\"相对=nofollow> 这个 网站工作正常。我没有改变任何资源ID。

I linked the library with my project in eclipse. Copied it to the libs folder in my Project.
Library classes are accessible to me in my java file. Imports work fine. Even the xml code that i copied from this website works fine. I didn't change any resource ids.

主要的问题是内容协助搞砸eclipse.Its当我使用DrawerLayout标签作为顶级父标签。

The main problem is the content assist in eclipse.Its messed up when i use the DrawerLayout tag as the top parent tag.

当我尝试preSS Ctrl +空格键内的任何块什么都不会弹出。

When i try to press ctrl + space inside any block nothing will pop up.

当我改变属性的应用变化的输出值。但是,内容帮助只是不会工作。

When i change the values of attributes the output of the app changes. But the content assist just wont work.

它显示了像Layout_height和layout_width属性,当I $里面

It shows up properties like Layout_height and layout_width when i press ctrl + space inside

android.support.v4.widget.DrawerLayout 标签,但不会显示其它标签内的任何结果。

android.support.v4.widget.DrawerLayout tag but will not show any result inside other tags

这一切是因为DrawerLayout标签被放置在上面。
如果我不使用它作为父标签,一切工作正常。

It all happens because of DrawerLayout tag being placed at the top. If i dont use it as the parent tag, everything works fine.

请帮我出去!

推荐答案

好吧,我是从的本网站,并在有界同样的问题。

Well, I was doing the same thing from this website and was bounded in the same problem.

您必须的了解,你需要在strings.xml档案来定义这些颜色资源的自己。定义你自己的颜色组合。虽然我明白教程必须说明这一点,但我觉得你是一个谁可以选择的颜色喜欢你,最好的。

You must understand that you need to define those color resources yourself in the strings.xml file. Define your own color combination. While I understand that the tutorial must have described this but I think you are the one who can select the colors liked to you, the best.

使用这个标签定义在strings.xml中的颜色:

Define the colors in strings.xml by using this tag :

<color name="name-of-color">hex-code-here</color>

访问使用资源: @色/名称的颜色在你的 XML布局 文件

这篇关于内容辅助不使用XML支持库工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆