Re: [android-developers] custom attributes in library projects

2011-10-19 Thread Izhovkin
Was this issue fixed in sdk tools r14?

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

Re: [android-developers] custom attributes in library projects

2011-10-19 Thread Xavier Ducrohet
not yet.

On Wed, Oct 19, 2011 at 12:51 AM, Izhovkin izhov...@gmail.com wrote:
 Was this issue fixed in sdk tools r14?

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



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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


Re: [android-developers] custom attributes in library projects

2011-02-24 Thread Romain
Hi,

Any chance this has been fixed - or a workaround is available?

Library projects seem to be the best approach to release multiple versions 
of an app (ex: free/paid),
and I was really hoping there is a better solution than to duplicate all of 
my custom layouts in both apps.

Many thanks,

Romain



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

[android-developers] custom attributes in library projects

2010-07-09 Thread Vladimir Lebedev-Schmidthof
Hello,

Having custom attribute (in attrs.xml) in library project leads to
compilation fail of the project dependent of that library.

I.e.:
MyLib project (library)

AndroidManifest.xml:
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.mycompany.test.lib
  android:versionCode=1
  android:versionName=1.0
...
/manifest

res/layout/main.xml:
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
xmlns:my=http://schemas.android.com/apk/res/
com.mycompany.test.lib
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

com.mycompany.test.lib.MyWidget
android:id=@+id/my_widget
android:layout_width=fill_parent
android:layout_height=fill_parent
my:customValue=324/
/LinearLayout

res/values/attrs.xml:
resources
declare-styleable name=MyWidget
attr name=customValue format=integer/
/declare-styleable
/resources

And there are nothing in TestApp except AndroidManifest.xml:
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.mycompany.test.app
  android:versionCode=1
  android:versionName=1.0
...
/manifest

And aapt says that
res/layout/main.xml:13: error: No resource identifier found for
attribute 'customValue' in package 'com.mycompany.test.lib'

How to avoid this except for no having custom attributes in library?

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


Re: [android-developers] custom attributes in library projects

2010-07-09 Thread Xavier Ducrohet
Ah, there's a problem with the namespace.

From aapt's point of view all the resources are compiled for the
package name of the application (com.mycompany.test.app in your case),
so your customValue attribute is defined in that namespace, and not
in the namespace of the library.

At this time, the only solution is to remove the layout from the
library and move it into the apps and edit the namespace to match the
application package.

We'll look at fixing this.
xav

On Thu, Jul 8, 2010 at 3:27 AM, Vladimir Lebedev-Schmidthof
dair@gmail.com wrote:
 Hello,

 Having custom attribute (in attrs.xml) in library project leads to
 compilation fail of the project dependent of that library.

 I.e.:
 MyLib project (library)

 AndroidManifest.xml:
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
      package=com.mycompany.test.lib
      android:versionCode=1
      android:versionName=1.0
 ...
 /manifest

 res/layout/main.xml:
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
        xmlns:my=http://schemas.android.com/apk/res/
 com.mycompany.test.lib
    android:orientation=vertical
    android:layout_width=fill_parent
    android:layout_height=fill_parent
    
 com.mycompany.test.lib.MyWidget
    android:id=@+id/my_widget
    android:layout_width=fill_parent
    android:layout_height=fill_parent
    my:customValue=324/
 /LinearLayout

 res/values/attrs.xml:
 resources
        declare-styleable name=MyWidget
                attr name=customValue format=integer/
        /declare-styleable
 /resources

 And there are nothing in TestApp except AndroidManifest.xml:
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
      package=com.mycompany.test.app
      android:versionCode=1
      android:versionName=1.0
 ...
 /manifest

 And aapt says that
 res/layout/main.xml:13: error: No resource identifier found for
 attribute 'customValue' in package 'com.mycompany.test.lib'

 How to avoid this except for no having custom attributes in library?

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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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