安卓:我如何引用驻留在一个库,我的应用程序引用一个风格化的? [英] Android: How do I reference a stylable that resides in a library that my app references?
问题描述
我有我创建一个驻留在我引用我的应用程序库中的自定义视图。在图书馆里我宣布设置样式,该视图使用。在我的应用程序,我使用的是自定义视图从库这样:
I have a custom view I created that resides in a library I'm referencing in my app. In the library I declared a styleable, which the view uses. In my app, I'm using the custom view from the library as such:
<nefarious.library.myappname.views.DragDropList
xmlns:ddl="http://schemas.android.com/apk/res/nefarious.library.myappname"
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:clickable="true"
android:longClickable="true"
android:focusable="true"
android:hapticFeedbackEnabled="true"
android:cacheColorHint="#00000000"
ddl:normalHeight="@dimen/list_item_height"
ddl:doubleHeight="@dimen/list_item_height_doubled"
ddl:grabber="@id/grabber"
ddl:grabberPadding="30dip"
ddl:dragndropBackground="@color/moola_light" />
的Eclipse似乎具有寻找风格化的问题。 Eclipse是告诉我它无法找到我的风格化属性中的每一个资源标识符。
Eclipse seems to be having a problem finding the stylable. Eclipse is telling me it couldn't find the resource identifier for every one of my stylable attributes.
我怎样才能得到我的应用程序看到风格化从图书馆?
How can I get my app to see the stylable from the library?
我的问题正是这一个:
<一个href=\"http://stackoverflow.com/questions/573581/specifying-android-project-dependencies-in-eclipse\">http://stackoverflow.com/questions/573581/specifying-android-project-dependencies-in-eclipse
这似乎没有得到回答。
推荐答案
由于YOUT库没有打包为APK,你必须改变从<自定义sheme href=\"http://schemas.android.com/apk/res/nefarious.library.myappname\">http://schemas.android.com/apk/res/nefarious.library.myappname到<一个href=\"http://schemas.android.com/res/nefarious.library.myappname\">http://schemas.android.com/res/nefarious.library.myappname.
我希望这将有助于
Since yout library is not packaged as an apk, you have to change custom sheme from http://schemas.android.com/apk/res/nefarious.library.myappname to http://schemas.android.com/res/nefarious.library.myappname. I hope it will help
这篇关于安卓:我如何引用驻留在一个库,我的应用程序引用一个风格化的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!