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. Flowchart of "app upgrade procedure"..?

Background:
I'm developing an app which comes with a rather large database (static, 
readonly), about 1.5Mb gziped.
This database is then served from a content provider. The database has to be 
upgraded about 4 times a year. At first I thought about syncing/incremental 
updates (then it would be readwrite of course) but now I'm trying to keep is 
simple and thinking I should maybe just publish a new version of app when an 
update is needed and swap the database under the content provider...

Question:
Since this is a content provider that is "public" and also might be serving 
other apps in the future... What is androids procedure for updating an app 
(via the market i.e). I'm assuming any currently running instance is killed 
overwritten and restarted if necessary but I have been unable to confirm 
this. Has anyone done something similar, hot swapping etc?

--Albin

-- 

2. Non-Market Devices Increasing

Anyone having a lot of support requests from users trying to install their apps on "non-Market" devices, especially book readers and tablets? It seems like I get one of these almost every day lately, usually asking about some device that I've never heard of and have to Google in order to find out what it is.

A lot of these devices are running highly customized versions of Android and just flat out will not work with many normal apps, but try telling that to a customer. For example, I downloaded the SDK and emulator for the Barnes & Noble "Nook" just to play around with. It looks like a lot of the bookreaders, in order to protect copyrights and all that, implement higher levels of security and my app was not able to create the directory on the SD card that it requires, so no-go.

Just today I got a message from someone trying to install on a "Pocketbook IQ 701" (another reader, running "Android 2.0") and it was giving her a message "Unable to parse package" when trying to install. Not much I can do about that, but I doubt the app would run even if it installed.

Anyway, the fact of the matter is that Android is not really a single operating system and it would be impossible to write an app that would anticipate all the ways that a vendor might enhance (or cripple) a particular implementation. But customers can't understand why, if it says "Android", why an app called "X for Android" won't run on their device.

--
Doug Gordon
GHCS Software
http://www.ghcssoftware.com
g...@ghcssoftware.com

--
.

3. lebih baik desire hd ato hd2 ato lainnya?

4. [share] kapanlagi.com on android

5. [WTB] Anti Fingerprint (Bandung only)

6. [WTPamer] Pasukan robotijo baru aja tiba.. :D

7. How to speed up the boot up process in Android?