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. Stopping monkey test

Hi all,
Is it possible to abort monkey once it is started? I cant see any task
called monkey in the shell. Also, I had killed the testing app but
failed to stop the monkey...Please help

Thanks

-- 

2. battery percent on desire

Disuruh login (T_T)

-- 
"Indonesian Android Community [id-android]" 

3. Do threads cache instance variables?

4. Passing an int value from one activity to another

5. JDK and Eclipse installation

6. Simpler way unlock MSL Code HTC EVO 4G

7. println needs a message