Hi, 

I'm sublcassing an ImageView and adding one custom attribute like this in a 
res/values/attrs file:

<resources>

     <declare-styleable name="CustomImageView">

        <attr name="pattern" format="integer" />

    </declare-styleable>

</resources>


In my layout file I can use it like this:


<com.company.test.CustomImageView

            android:id="@+id/CustomImage"

            android:layout_width="fill_parent"

            android:layout_height="wrap_content"

            android:layout_centerHorizontal="true"

            android:layout_alignParentTop="true"

            app:pattern="@drawable/example_drawable"

            /> 


I've been reading some forums and I've seen two way for use it, with "app" 
and with "custom", but I don't know the difference. If someone can explain 
me I'll appreciate.


But the important question for me is that when I add the res/values/attrs 
for my custom ImageView, Eclipse doesn't autocomplete the default 
attributes for an ImageView like the "android:src" or "android:scaleType"


Does anyone know why are this happening?


Thanks in advance. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to