Custom View Subclass - How do I properly specify xmlns in my layout.xml file?

by Mark Rosenberg » Mon, 06 Apr 2009 13:23:46 GMT


Sponsored Links
 I am following the LabelView.java and associated custom_view_1.xml
layout files to guide me, but I am perplexed by the xmlns:app
specification. My custom view is in the com.foo.bar package. What do I
specify as the xmlns:app value to properly bind my XML layout
declarations to the attribute set my custom view constructor
processes?

I've tried xmlns:app="com.foo.bar", xmlns:app="http://
schemas.android.com/apk/res/com.foo.bar", xmlns:app="http://
schemas.android.com/com.foo.bar" to no avail.

Its not clear to me why the api example uses an http: scheme in the
first place. Shouldn't the package name be adequately unique?
--~--~---------~--~----~------------~-------~--~----~



Custom View Subclass - How do I properly specify xmlns in my layout.xml file?

by Mark Rosenberg » Mon, 06 Apr 2009 14:00:20 GMT


 Must be tired ... forgot to refresh or something ... xmlns:app="http://
schemas.android.com/apk/res/com.foo.bar" does the trick.

On Apr 5, 10:23pm, Mark Rosenberg <markrosenberg01460...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Custom View Subclass - How do I properly specify xmlns in my layout.xml file?

by mawei1981 » Sat, 11 Apr 2009 00:49:39 GMT


 I thought you are not read the Dev Guide clear


you can define like the follow code


-----------------------------------------------------
 <com.foo.bar android:id="@+id/parameterName"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</com.foo.bar>

-----------------------------------------------------------
Done.

Good Luck.


On 4 13 Mark Rosenberg <markrosenberg01460...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to order the items of GridView?

Dear all,
   In emulator, the items of GridView(e.g. Launcher) are in
alphabetical order.  Would you please point me how to implement a user-
defined order in Launcher? For example, I'd like 'Browser' to be the
first item in Launcher... Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~

2. Android/G1 framebuffer driver

Where can I find framebuffer driver?

There are a lot of sources in git and I can't find out wich one is
used for MSM7201A chipset used in G1. Thanks for response.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. New Posting on funfashion4u (on 10 Apr 09)

4. Conversion to Dalvik format failed with error

5. starting zygote from command line (x86)

6. JavaMediaFramework

7. Send Email Automatically