开发者

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:l开发者_如何学Pythonist"  
   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 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?

My question is exactly this one:

Specifying Android project dependencies (in Eclipse)

Which appears to not have been answered.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜